Index: configure.in ================================================================== --- configure.in +++ configure.in @@ -1,8 +1,8 @@ dnl -*- autoconf -*- dnl FILE: "/home/joze/src/tclreadline/configure.in" -dnl LAST MODIFICATION: "Sat, 25 Mar 2000 21:17:25 +0100 (joze)" +dnl LAST MODIFICATION: "Sat, 01 Jul 2000 16:19:57 +0200 (joze)" dnl (C) 1998 - 2000 by Johannes Zellner, dnl $Id$ dnl --- dnl dnl tclreadline -- gnu readline for tcl @@ -20,11 +20,11 @@ AC_REVISION($Revision$) AC_CONFIG_AUX_DIR(./aux) TCLREADLINE_MAJOR_VERSION=1 TCLREADLINE_MINOR_VERSION=2 -TCLREADLINE_PATCHLEVEL=0 +TCLREADLINE_PATCHLEVEL=1 TCLREADLINE_VERSION=$TCLREADLINE_MAJOR_VERSION.$TCLREADLINE_MINOR_VERSION TCLREADLINE_PATCHLEVEL_STR=${TCLREADLINE_VERSION}.${TCLREADLINE_PATCHLEVEL} VERSION=$TCLREADLINE_VERSION dnl AM_INIT_AUTOMAKE(tclreadline, $VERSION) Index: tclreadlineCompleter.tcl ================================================================== --- tclreadlineCompleter.tcl +++ tclreadlineCompleter.tcl @@ -1,8 +1,8 @@ # -*- tclsh -*- # FILE: "/home/joze/src/tclreadline/tclreadlineCompleter.tcl" -# LAST MODIFICATION: "Sat, 25 Mar 2000 21:28:45 +0100 (joze)" +# LAST MODIFICATION: "Sat, 01 Jul 2000 16:15:55 +0200 (joze)" # (C) 1998 - 2000 by Johannes Zellner, # $Id$ # vim:set ts=4: # --- # @@ -492,17 +492,25 @@ # option table. # if {[catch [list set option_table [eval ${cmd} configure]] msg]} { return 0 } + set retval 0 foreach optline ${option_table} { - if {5 != [llength ${optline}]} continue else { + if {5 == [llength ${optline}]} { + # tk returns a list of length 5 lappend options(switches) [lindex ${optline} 0] lappend options(value) [lindex ${optline} 4] + incr retval + } elseif {3 == [llength ${optline}]} { + # itcl returns a list of length 3 + lappend options(switches) [lindex ${optline} 0] + lappend options(value) [lindex ${optline} 2] + incr retval } } - return [llength ${option_table}] + return $retval } #** # try to complete a `cmd configure|cget ..' from the command's options. # @param text start line cmd, standard tclreadlineCompleter arguments.