[slime-cvs] CVS slime

mbaringer mbaringer at common-lisp.net
Tue Apr 17 20:06:22 UTC 2007


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

Modified Files:
	swank.lisp 
Log Message:
(swank-compiler): Fix the return value to always be a
list of two elements even if the abort restart is invoked which
originally just returned NIL. (Which wouldn't play with the recent
change to use DESTRUCTURING-BIND in SLIME-COMPILATION-FINISHED.)

(inspect-for-emacs %package-symbols-container): Revert Marco's change
from 2007-04-08; he had the good idea of adding a facility to jump to
the relevant source line of a symbol, but `M-.' is already bound to
SLIME-FIND-DEFINITION in the inspector, which is a nicer way of doing
this alltogether.


--- /project/slime/cvsroot/slime/swank.lisp	2007/04/16 14:24:35	1.475
+++ /project/slime/cvsroot/slime/swank.lisp	2007/04/17 20:06:22	1.476
@@ -3055,12 +3055,17 @@
 
 (defun swank-compiler (function)
   (clear-compiler-notes)
-  (with-simple-restart (abort "Abort SLIME compilation.")
-    (multiple-value-bind (result usecs)
+  (multiple-value-bind (result usecs)
+      (with-simple-restart (abort "Abort SLIME compilation.")
         (handler-bind ((compiler-condition #'record-note-for-condition))
-          (measure-time-interval function))
-      (list (to-string result)
-            (format nil "~,2F" (/ usecs 1000000.0))))))
+          (measure-time-interval function)))
+    ;; WITH-SIMPLE-RESTART returns (values nil t) if its restart is invoked;
+    ;; unfortunately the SWANK protocol doesn't support returning multiple
+    ;; values, so we gotta convert it explicitely to a list in either case.
+    (if (and (not result) (eq usecs 't))
+        (list nil nil)
+        (list (to-string result)
+              (format nil "~,2F" (/ usecs 1000000.0))))))
 
 (defslimefun compile-file-for-emacs (filename load-p)
   "Compile FILENAME and, when LOAD-P, load the result.
@@ -4973,10 +4978,6 @@
                   (multiple-value-bind (symbol-string classification-string)
                       (string-representations symbol)
                     `((:value ,symbol ,symbol-string) ,classification-string
-                      " "
-                      (:action "[jump to source]"
-                               , (let ((symbol symbol))
-                                   (lambda () (ed-in-emacs symbol))))
                       (:newline)
                       )))))))))
 




More information about the slime-cvs mailing list