#995 auto_mkindex reports error which is not existing

obsolete: 8.1

OriginalBugID: 2611 Bug
Version: 8.1
SubmitDate: '1999-08-31'
LastModified: '2000-01-28'
Severity: MED
Status: Released
Submitter: techsupp
ChangedBy: ericm
RelatedBugIDs: 2480
OS: All
FixedDate: '2000-01-28'
FixedInVersion: 8.3
ClosedDate: '2000-10-25'

Hermann Boeken

script dummy.tcl:

set dummy_string "{dummy} {return \$dummy}"

proc dummy_proc {} {



Start a tclsh (8.1) and perform the command <auto_mkindex . *.tcl>,
where the above script dummy.tcl is in the current directory.

The above command produces the following error message:

can't read "dummy": no such variable

Putting the command in a script <auto.tcl> and executing it with the
tclsh gives some more
information on this unexpected error message:
can't read "dummy": no such variable
while executing
"set dummy_string "{dummy} {return \\$dummy}"" <----
invoked from within
"$parser eval $contents"
(procedure "auto_mkindex_parser::mkindex" line 25)
invoked from within
"auto_mkindex_parser::mkindex $file"
(procedure "auto_mkindex" line 25)
invoked from within
"auto_mkindex . *.tcl
(file "auto.tcl" line 1)

As with Tcl 8.0.5 I expect a tclIndex to be generated which contains the
following contents:

# Tcl autoload index file, version 2.0
# This file is generated by the "auto_mkindex" command
# and sourced to set up indexing information for one or
# more commands. Typically each line is a command that
# sets an element in the auto_index array, where the
# element name is the name of a command and the value is
# a script that loads the command.

set auto_index(dummy_proc) [list source [file join $dir dummy.tcl]]

Verified in 8.2.1
-- 10/29/1999 hobbs

This was caused by an over-aggressive attempt to protect from undefined variables in the source being indexed. It was adding a backslash escape for every dollar sign it saw, even if the dollar was already escaped (as was the case here). Of course, re-escaping an escaped dollar sign basically means that the dollar sign is not escaped at all, which lead to the error you saw.
This is fixed in 8.3.

- eric

-- 01/28/2000 ericm


  • Brent B. Welch

    Brent B. Welch - 2000-10-26
    • priority: 5 --> 2
    • status: open --> closed-fixed
  • Don Porter

    Don Porter - 2001-04-05
    • labels: 104248 --> 38. Init - Library - Autoload

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks