Subject: :q!

From: dgp <[email-masked]>
Date: Wed, 25 Jul 2012 14:34:36 +0000

---
 library/init.tcl | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/library/init.tcl b/library/init.tcl
index f2f85e1..02bce3b 100644
--- a/library/init.tcl
+++ b/library/init.tcl
@@ -618,11 +618,14 @@ proc auto_execok name {
 	}
     }
 
-    foreach dir [split $path {;}] {
-	# Skip already checked directories
-	if {[info exists checked($dir)] || $dir eq {}} { continue }
-	set checked($dir) {}
-	foreach ext $execExtensions {
+    foreach ext $execExtensions {
+	unset -nocomplain checked
+	foreach dir [split $path {;}] {
+	    # Skip already checked directories
+	    if {[info exists checked($dir)] || $dir eq {}} {
+		continue
+	    }
+	    set checked($dir) {}
 	    set file [file join $dir ${name}${ext}]
 	    if {[file exists $file] && ![file isdirectory $file]} {
 		return [set auto_execs($name) [list $file]]
-- 
cgit v0.12