[slime-cvs] CVS update: slime/present.lisp

Matthias Koeppe mkoeppe at common-lisp.net
Sun Aug 7 17:03:36 UTC 2005


Update of /project/slime/cvsroot/slime
In directory common-lisp.net:/tmp/cvs-serv14045

Modified Files:
	present.lisp 
Log Message:
(lookup-presented-object): Handle ids that are
conses. 
(execute-menu-choice-for-presentation-id): Use equal for comparing
ids, to handle the cons case.
(menu-choices-for-presentation): Quote the presentation id, as it
can be a cons.

Date: Sun Aug  7 19:03:35 2005
Author: mkoeppe

Index: slime/present.lisp
diff -u slime/present.lisp:1.9 slime/present.lisp:1.10
--- slime/present.lisp:1.9	Thu Aug  4 22:13:07 2005
+++ slime/present.lisp	Sun Aug  7 19:03:35 2005
@@ -35,7 +35,12 @@
 
 (defun lookup-presented-object (id)
   "Retrieve the object corresponding to id. :not-present returned if it isn't there"
-  (gethash id *presentation-id-to-object* :not-present))
+  (if (consp id)
+      (let ((values (gethash (car id) *presentation-id-to-object* :not-present)))
+	(if (eql values :not-present)
+	    :not-present
+	    (nth (cdr id) values)))
+      (gethash id *presentation-id-to-object* :not-present)))
 
 (defun save-presented-object (object)
   "If the object doesn't already have an id, save it and allocate
@@ -234,7 +239,7 @@
 
 (defun execute-menu-choice-for-presentation-id (id count item)
   (let ((ob (lookup-presented-object id)))
-    (assert (eql id (car *presentation-active-menu*)) () 
+    (assert (equal id (car *presentation-active-menu*)) () 
 	    "Bug: Execute menu call for id ~a  but menu has id ~a"
 	    id (car *presentation-active-menu*))
     (let ((action (second (nth (1- count) (cdr *presentation-active-menu*)))))
@@ -247,7 +252,7 @@
   (declare (ignore ob))
   (list 
    (list "Inspect" (lambda(choice object id) (declare (ignore choice object)) 
-			  `(slime-inspect-presented-object ,id)))
+			  `(slime-inspect-presented-object ',id)))
    (list "Describe" (lambda(choice object id) (declare (ignore id choice)) 
 			   (describe object) 
 			   nil))




More information about the slime-cvs mailing list