[mcclim-cvs] CVS mcclim

crhodes crhodes at common-lisp.net
Fri May 12 10:24:32 UTC 2006


Update of /project/mcclim/cvsroot/mcclim
In directory clnet:/tmp/cvs-serv17798

Modified Files:
	commands.lisp 
Log Message:
In accepting command names textually, suggest only one command per 
string name, and suggest ones from the child tables in preference.  This 
allows command shadowing to behave as you might expect.


--- /project/mcclim/cvsroot/mcclim/commands.lisp	2006/04/21 12:03:23	1.62
+++ /project/mcclim/cvsroot/mcclim/commands.lisp	2006/05/12 10:24:32	1.63
@@ -1090,11 +1090,15 @@
 				    &key)
   (flet ((generator (string suggester)
 	   (declare (ignore string))
-	   (map-over-command-table-names
-	    (lambda (cline-name command-name)
-	      (when (command-enabled command-name *application-frame*)
-		(funcall suggester cline-name command-name)))
-	    command-table)))
+           (let ((possibilities nil))
+             (map-over-command-table-names
+              (lambda (cline-name command-name)
+                (when (command-enabled command-name *application-frame*)
+                  (pushnew (cons cline-name command-name) possibilities
+                           :key #'car :test #'string=)))
+              command-table)
+             (loop for (cline-name . command-name) in possibilities
+                   do (funcall suggester cline-name command-name)))))
     ;; Bind the frame's command table so that the command-enabled
     ;; test passes with this command table.
     (letf (((frame-command-table *application-frame*)




More information about the Mcclim-cvs mailing list