[slime-cvs] CVS slime

mbaringer mbaringer at common-lisp.net
Sun Apr 8 18:55:52 UTC 2007


Update of /project/slime/cvsroot/slime
In directory clnet:/tmp/cvs-serv11891

Modified Files:
	swank.lisp 
Log Message:
(inspect-for-emacs): Added 'jump to source' action
for symbols in the new package-symbol browser.


--- /project/slime/cvsroot/slime/swank.lisp	2007/04/08 18:24:03	1.471
+++ /project/slime/cvsroot/slime/swank.lisp	2007/04/08 18:55:52	1.472
@@ -4975,7 +4975,28 @@
            ,@(loop for symbol in symbols appending
                   (multiple-value-bind (symbol-string classification-string)
                       (string-representations symbol)
-                    `((:value ,symbol ,symbol-string) ,classification-string (:newline))))))))))
+                    `((:value ,symbol ,symbol-string) ,classification-string
+                      " "
+                      (:action "[jump to source]"
+                               , (let ((symbol symbol))
+                                   (lambda ()
+                                     ;; it would be nice to be a
+                                     ;; little smarter here and not
+                                     ;; convert the symbol to a string
+                                     ;; and have slime-edit-definition
+                                     ;; return to the same symbol
+                                     ;; again. however we already have
+                                     ;; this machinery in place and
+                                     ;; not using it would require
+                                     ;; updating this code whenever
+                                     ;; the find-definitions code
+                                     ;; changes.
+                                     (eval-in-emacs `(progn
+                                                       (slime-edit-definition
+                                                        ,(let ((*package* (find-package :common-lisp))) (format nil "~S" symbol)))
+                                                       t)))))
+                      (:newline)
+                      )))))))))
 
 
 (defmethod inspect-for-emacs ((package package) inspector)




More information about the slime-cvs mailing list