summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2005-01-25 16:39:48 (GMT)
committerdgp <dgp@users.sourceforge.net>2005-01-25 16:39:48 (GMT)
commit2d7b99e0ac484196f8de1cd5a31123baa638d6e7 (patch)
treebe5dd295965f011adfc81ca7cd33bef7d4b15b3b
parentcbd6f3b18257a643fc4d8c0a480277e8015637f9 (diff)
downloadtcl-2d7b99e0ac484196f8de1cd5a31123baa638d6e7.zip
tcl-2d7b99e0ac484196f8de1cd5a31123baa638d6e7.tar.gz
tcl-2d7b99e0ac484196f8de1cd5a31123baa638d6e7.tar.bz2
* library/auto.tcl: Updated [auto_reset] to clear auto-loaded
commands in namespaces other than :: and to clear auto-loaded commands that do not happen to be procs. [Bug 1101670] ***POTENTIAL INCOMPATIBILITY***
-rw-r--r--ChangeLog7
-rw-r--r--library/auto.tcl22
2 files changed, 17 insertions, 12 deletions
diff --git a/ChangeLog b/ChangeLog
index 127c7ac..3fbc349 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2005-01-25 Don Porter <dgp@users.sourceforge.net>
+
+ * library/auto.tcl: Updated [auto_reset] to clear auto-loaded
+ commands in namespaces other than :: and to clear auto-loaded commands
+ that do not happen to be procs. [Bug 1101670]
+ ***POTENTIAL INCOMPATIBILITY***
+
2005-01-25 Daniel Steffen <das@users.sourceforge.net>
* unix/tcl.m4 (Darwin): fixed bug with static build linking to
diff --git a/library/auto.tcl b/library/auto.tcl
index 6638cc1..e8aa61a 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.22 2005/01/25 16:39:56 dgp Exp $
#
# Copyright (c) 1991-1993 The Regents of the University of California.
# Copyright (c) 1994-1998 Sun Microsystems, Inc.
@@ -16,23 +16,21 @@
#
# 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 {}
- }
+ 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 {[info library] ni $::auto_path} {
+ lappend ::auto_path [info library]
}
- catch {unset auto_execs}
- catch {unset auto_index}
- catch {unset auto_oldpath}
}
# tcl_findLibrary --