diff options
author | Kevin B Kenny <kennykb@acm.org> | 2005-02-02 15:53:08 (GMT) |
---|---|---|
committer | Kevin B Kenny <kennykb@acm.org> | 2005-02-02 15:53:08 (GMT) |
commit | 3c0515c337e167fca046dd00e93ed8b2854a5230 (patch) | |
tree | b43fda01c3d1ab7d76ccc32f883baeefad6ce632 /library | |
parent | bf8624b10b90162a40fbfd22728aa7400752eaf9 (diff) | |
download | tcl-3c0515c337e167fca046dd00e93ed8b2854a5230.zip tcl-3c0515c337e167fca046dd00e93ed8b2854a5230.tar.gz tcl-3c0515c337e167fca046dd00e93ed8b2854a5230.tar.bz2 |
sync with head, add TclStrToD (TIP #132)
Diffstat (limited to 'library')
-rw-r--r-- | library/auto.tcl | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/library/auto.tcl b/library/auto.tcl index 6638cc1..453ff59 100644 --- a/library/auto.tcl +++ b/library/auto.tcl @@ -3,7 +3,7 @@ # utility procs formerly in init.tcl dealing with auto execution # of commands and can be auto loaded themselves. # -# RCS: @(#) $Id: auto.tcl,v 1.21 2004/12/01 22:14:20 dgp Exp $ +# RCS: @(#) $Id: auto.tcl,v 1.21.2.1 2005/02/02 15:53:30 kennykb Exp $ # # Copyright (c) 1991-1993 The Regents of the University of California. # Copyright (c) 1994-1998 Sun Microsystems, Inc. @@ -16,23 +16,27 @@ # # Destroy all cached information for auto-loading and auto-execution, # so that the information gets recomputed the next time it's needed. -# Also delete any procedures that are listed in the auto-load index -# except those defined in this file. +# Also delete any commands that are listed in the auto-load index. # # Arguments: # None. proc auto_reset {} { - variable ::tcl::auto_oldpath - global auto_execs auto_index - foreach p [info procs] { - if {[info exists auto_index($p)]} { - rename $p {} + if {[array exists ::auto_index]} { + foreach cmdName [array names ::auto_index] { + set fqcn [namespace which $cmdName] + if {$fqcn eq ""} {continue} + rename $fqcn {} + } + } + unset -nocomplain ::auto_execs ::auto_index ::tcl::auto_oldpath + if {[catch {llength $::auto_path}]} { + set ::auto_path [list [info library]] + } else { + if {[info library] ni $::auto_path} { + lappend ::auto_path [info library] } } - catch {unset auto_execs} - catch {unset auto_index} - catch {unset auto_oldpath} } # tcl_findLibrary -- |