[clfswm-cvs] r81 - in clfswm: . src

pbrochard at common-lisp.net pbrochard at common-lisp.net
Tue Apr 22 19:11:40 UTC 2008


Author: pbrochard
Date: Tue Apr 22 15:11:38 2008
New Revision: 81

Modified:
   clfswm/ChangeLog
   clfswm/src/clfswm-util.lisp
Log:
Show the documentation for the function bound on a key.


Modified: clfswm/ChangeLog
==============================================================================
--- clfswm/ChangeLog	(original)
+++ clfswm/ChangeLog	Tue Apr 22 15:11:38 2008
@@ -1,5 +1,8 @@
 2008-04-22  Philippe Brochard  <pbrochard at common-lisp.net>
 
+	* src/clfswm-util.lisp (identify-key): Show the documentation for
+	the function bound on a key.
+
 	* src/clfswm-menu.lisp: New menu system that let user change keys
 	or functions associated to keys.
 

Modified: clfswm/src/clfswm-util.lisp
==============================================================================
--- clfswm/src/clfswm-util.lisp	(original)
+++ clfswm/src/clfswm-util.lisp	Tue Apr 22 15:11:38 2008
@@ -220,9 +220,9 @@
 				   :line-style :solid)))
     (labels ((print-doc (msg hash-table-key pos code state)
 	       (let ((function (find-key-from-code hash-table-key code state)))
-		 (when function
+		 (when (and function (fboundp (first function)))
 		   (xlib:draw-image-glyphs window gc 10 (+ (* pos (+ (xlib:max-char-ascent font) (xlib:max-char-descent font))) 5)
-					   (format nil "~A ~A" msg (documentation function 'function))))))
+					   (format nil "~A ~A" msg (documentation (first function) 'function))))))
 	     (print-key (code state keysym key modifiers)
 	       (xlib:clear-area window)
 	       (setf (xlib:gcontext-foreground gc) (get-color *identify-foreground*))



More information about the clfswm-cvs mailing list