Index: library/auto.tcl
===================================================================
RCS file: /cvsroot/tcl/tcl/library/auto.tcl,v
retrieving revision 1.21
diff -u -r1.21 auto.tcl
--- library/auto.tcl	1 Dec 2004 22:14:20 -0000	1.21
+++ library/auto.tcl	24 Jan 2005 20:43:14 -0000
@@ -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 --
