[slime-cvs] CVS update: slime/slime.el

Luke Gorrie lgorrie at common-lisp.net
Fri Apr 1 11:02:25 UTC 2005


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

Modified Files:
	slime.el 
Log Message:
(slime-goto-definition): Handle :error locations here before any
window/buffer changes are made.

Date: Fri Apr  1 13:02:18 2005
Author: lgorrie

Index: slime/slime.el
diff -u slime/slime.el:1.475 slime/slime.el:1.476
--- slime/slime.el:1.475	Fri Apr  1 10:42:15 2005
+++ slime/slime.el	Fri Apr  1 13:02:15 2005
@@ -5126,8 +5126,13 @@
 
 (defun slime-goto-definition (name definitions &optional where)
   (slime-push-definition-stack)
-  (cond ((slime-length> definitions 1)
-         (slime-show-definitions name definitions))
+  (if (slime-length> definitions 1)
+      (slime-show-definitions name definitions)
+    (let ((def (car definitions)))
+      (destructure-case (slime-definition.location def)
+        ;; Take care of errors before switching any windows/buffers.
+        ((:error message)
+         (error "%s" message))
         (t
          (cond ((equal where 'window)
                 (slime-goto-definition-other-window (car definitions)))
@@ -5137,7 +5142,7 @@
                (t
                 (slime-goto-source-location (slime-definition.location
                                              (car definitions)))
-                (switch-to-buffer (current-buffer)))))))
+                (switch-to-buffer (current-buffer)))))))))
 
 (defun slime-goto-definition-other-window (definition)
   (slime-pop-to-other-window)




More information about the slime-cvs mailing list