[slime-cvs] CVS slime

heller heller at common-lisp.net
Thu Jun 28 12:27:51 UTC 2007


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

Modified Files:
	slime.el ChangeLog 
Log Message:
Undo some of Marco's changes from 2007-05-23.

* slime.el (def-slime-selector-method): BODY can return a buffer name,
like "*slime-events*".  Handle that and never ignore invalid return
values.  Force BODY to abort if there's no suitable buffer.  Why would
you want to switch buffers if the desired buffer doesn't exist?


--- /project/slime/cvsroot/slime/slime.el	2007/06/27 16:46:00	1.793
+++ /project/slime/cvsroot/slime/slime.el	2007/06/28 12:27:51	1.794
@@ -9716,14 +9716,17 @@
 selects a buffer.
 
 BODY is a series of forms which are evaluated when the selector
-is chosen. If they return a buffer that buffer is selected with
+is chosen. The returned buffer is selected with
 switch-to-buffer."
   `(setq slime-selector-methods
          (sort* (cons (list ,key ,description
                             (lambda () 
-                              (let ((new-buffer (progn , at body)))
-                                (when (bufferp new-buffer)
-                                  (switch-to-buffer new-buffer)))))
+                              (let ((buffer (progn , at body)))
+                                (cond ((get-buffer buffer)
+                                       (switch-to-buffer buffer))
+                                      (t
+                                       (message "No such buffer: %S" buffer)
+                                       (ding))))))
                       (remove* ,key slime-selector-methods :key #'car))
                 #'< :key #'car)))
 
@@ -9769,7 +9772,7 @@
 (def-slime-selector-method ?d
   "*sldb* buffer for the current connection."
   (or (sldb-get-default-buffer)
-      (message "No debugger buffer")))
+      (error "No debugger buffer")))
 
 (def-slime-selector-method ?e
   "most recently visited emacs-lisp-mode buffer."
--- /project/slime/cvsroot/slime/ChangeLog	2007/06/27 15:53:44	1.1138
+++ /project/slime/cvsroot/slime/ChangeLog	2007/06/28 12:27:51	1.1139
@@ -1,3 +1,11 @@
+2007-06-28  Helmut Eller  <heller at common-lisp.net>
+
+	* slime.el (def-slime-selector-method): Revert Marco's change from
+	2007-05-23.  BODY can return a buffer name, like "*slime-events*".
+	Handle that and never ignore invalid return values.  Force BODY to
+	abort if there's no suitable buffer.  Why would you want to switch
+	buffers if the desired buffer doesn't exist?
+
 2007-06-27  Tobias C. Rittweiler <tcr at freebits.de>
 
 	Fixing `C-c M-q' at the REPL. Thanks to André Thieme for pointing




More information about the slime-cvs mailing list