[climacs-cvs] CVS esa

thenriksen thenriksen at common-lisp.net
Sun Apr 30 11:59:03 UTC 2006


Update of /project/climacs/cvsroot/esa
In directory clnet:/tmp/cvs-serv10537

Modified Files:
	esa.lisp 
Log Message:
Made `gesture-name' return more sensible names and fixed bug in
`find-keystrokes-for-command'.


--- /project/climacs/cvsroot/esa/esa.lisp	2006/04/24 19:52:56	1.7
+++ /project/climacs/cvsroot/esa/esa.lisp	2006/04/30 11:59:03	1.8
@@ -510,8 +510,11 @@
 (defgeneric gesture-name (gesture))
 
 (defmethod gesture-name ((char character))
-  (or (char-name char)
-      char))
+  (if (and (graphic-char-p char)
+           (not (char= char #\Space)))
+      (string char)
+      (or (char-name char)
+          char)))
 
 (defun translate-name-and-modifiers (key-name modifiers)
   (with-output-to-string (s)
@@ -525,8 +528,7 @@
 	    when (plusp (logand modifier modifiers))
 	      do (princ name s))
       (princ (if (typep key-name 'character)
-		 (or (char-name key-name)
-		     key-name)
+		 (gesture-name key-name)
 		 key-name) s)))
 
 (defmethod gesture-name ((ev keyboard-event))
@@ -547,6 +549,7 @@
 		#'(lambda (menu-name keystroke item)
 		    (declare (ignore menu-name))
 		    (cond ((and (eq (command-menu-item-type item) :command)
+                                (listp (command-menu-item-value item))
 				(eq (car (command-menu-item-value item)) command))
 			   (push (cons keystroke prefix) keystrokes))
 			  ((eq (command-menu-item-type item) :menu)




More information about the Climacs-cvs mailing list