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

Luke Gorrie lgorrie at common-lisp.net
Fri Apr 1 08:42:18 UTC 2005


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

Modified Files:
	slime.el 
Log Message:
(slime-keys): Bind slime-edit-definition-other-window to `C-x 4 .' and
slime-edit-definition-other-frame to `C-x 5 .', shadowing the
equivalent find-tag... bindings.

(slime-goto-definition): In the other-window and other-frame cases,
make sure point does not move in the originating window, even when the
definition is found in the same buffer.

Date: Fri Apr  1 10:42:16 2005
Author: lgorrie

Index: slime/slime.el
diff -u slime/slime.el:1.474 slime/slime.el:1.475
--- slime/slime.el:1.474	Thu Mar 31 21:33:40 2005
+++ slime/slime.el	Fri Apr  1 10:42:15 2005
@@ -555,6 +555,8 @@
     ("\C-i" slime-complete-symbol :prefixed t :inferior t)
     ("\M-i" slime-fuzzy-complete-symbol :prefixed t :inferior t)
     ("\M-." slime-edit-definition :inferior t :sldb t)
+    ("\C-x4." slime-edit-definition-other-window :inferior t :sldb t)
+    ("\C-x5." slime-edit-definition-other-frame :inferior t :sldb t)
     ("\M-," slime-pop-find-definition-stack :inferior t :sldb t)
     ("\M-*" slime-pop-find-definition-stack :inferior t :sldb t)
     ("\C-q" slime-close-parens-at-point :prefixed t :inferior t)
@@ -5127,14 +5129,24 @@
   (cond ((slime-length> definitions 1)
          (slime-show-definitions name definitions))
         (t
-         (slime-goto-source-location (slime-definition.location
-                                      (car definitions)))
          (cond ((equal where 'window)
-                (switch-to-buffer-other-window (current-buffer)))
+                (slime-goto-definition-other-window (car definitions)))
                ((equal where 'frame)
-                (switch-to-buffer-other-frame (current-buffer)))
+                (let ((pop-up-frames t))
+                  (slime-goto-definition-other-window (car definitions))))
                (t
+                (slime-goto-source-location (slime-definition.location
+                                             (car definitions)))
                 (switch-to-buffer (current-buffer)))))))
+
+(defun slime-goto-definition-other-window (definition)
+  (slime-pop-to-other-window)
+  (slime-goto-source-location (slime-definition.location definition))
+  (switch-to-buffer (current-buffer)))
+
+(defun slime-pop-to-other-window ()
+  "Pop to the other window, but not to any particular buffer."
+  (pop-to-buffer (current-buffer) t))
 
 (defun slime-edit-definition-other-window (name)
   "Like `slime-edit-definition' but switch to the other window."




More information about the slime-cvs mailing list