diff options
author | ericm <ericm> | 2000-02-01 01:14:00 (GMT) |
---|---|---|
committer | ericm <ericm> | 2000-02-01 01:14:00 (GMT) |
commit | acb2f260bec04797bce0d16b709b530c511fe87f (patch) | |
tree | 112da6d0b67c743bbc7eec435cfb6c42345bd653 /library/init.tcl | |
parent | bfc121a8bd79c18c8d1b7760be65a4db3ad18bfd (diff) | |
download | tcl-acb2f260bec04797bce0d16b709b530c511fe87f.zip tcl-acb2f260bec04797bce0d16b709b530c511fe87f.tar.gz tcl-acb2f260bec04797bce0d16b709b530c511fe87f.tar.bz2 |
* tests/package.test:
* library/tclIndex:
* library/package.tcl: Added ::package namespace and
::package::create function.
* library/init.tcl: Fixed problem with auto_load and determining
if commands were loaded.
* library/auto.tcl: "Fixed" issues with $ in files to be auto indexed.
* doc/Package.n: New man page for package::create function.
* doc/pkgMkIndex.n: Added additional information.
* doc/library.n: Added additional qualification regarding auto_mkindex.
Diffstat (limited to 'library/init.tcl')
-rw-r--r-- | library/init.tcl | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/library/init.tcl b/library/init.tcl index c5fff21..ecc926f 100644 --- a/library/init.tcl +++ b/library/init.tcl @@ -3,7 +3,7 @@ # Default system startup file for Tcl-based applications. Defines # "unknown" procedure and auto-load facilities. # -# RCS: @(#) $Id: init.tcl,v 1.37 2000/01/29 00:12:46 ericm Exp $ +# RCS: @(#) $Id: init.tcl,v 1.38 2000/02/01 01:14:01 ericm Exp $ # # Copyright (c) 1991-1993 The Regents of the University of California. # Copyright (c) 1994-1996 Sun Microsystems, Inc. @@ -312,10 +312,10 @@ proc auto_load {cmd {namespace {}}} { # name. One is to use # info commands $name # Unfortunately, if the name has glob-magic chars in it like * - # or [], it may not match. Since we really want an exact match, - # a better route is to use - # lsearch -exact [info commands] $name - if {[lsearch -exact [info commands] $name] != -1 } { + # or [], it may not match. For our purposes here, a better + # route is to use + # namespace which -command $name + if { ![string equal [namespace which -command $name] ""] } { return 1 } } |