auto_mkindex
auto_mkindex dir ?pattern ...?
Writes the tclIndex file of a folder for auto_load, as Tcl does. Each file of the patterns (the default is *.tcl) is read as Tcl text, and no command of it runs: proc defines a command, namespace eval goes into its body with that namespace, and namespace ensemble create defines the command of the namespace. auto_mkindex_parser::command NAME ARGS BODY adds a handler for a command of the files, which can append lines to the variable index.
This page also has auto_mkindex_parser::command, auto_mkindex_parser::fullname, auto_mkindex_parser::slavehook.
Facts
- Capability:
package. A new interpreter does not have this command. See Limits and capabilities. - Compute cost: one compute unit for the call, and more for the commands that it runs.
Differences from Tcl 8.6
- The commands of
auto_mkindex_parser::slavehookrun nowhere, since the parse runs no command of a file.