[slime-cvs] CVS slime
trittweiler
trittweiler at common-lisp.net
Thu Aug 14 14:20:10 UTC 2008
Update of /project/slime/cvsroot/slime
In directory clnet:/tmp/cvs-serv11889
Modified Files:
slime.el ChangeLog
Log Message:
`C-c C-z' now selects an REPL displayed in another frame instead
of splitting the current frame, and displaying the REPL in the
newly created window.
* slime.el (slime-switch-to-output-buffer-search-all-frames): New
variable to customize this behaviour, as it may not be optimal for
people using multiple screens at once.
(slime-switch-to-output-buffer): Adapted.
--- /project/slime/cvsroot/slime/slime.el 2008/08/14 11:46:38 1.994
+++ /project/slime/cvsroot/slime/slime.el 2008/08/14 14:20:08 1.995
@@ -2697,14 +2697,30 @@
(insert-before-markers string)
(set-marker marker (point)))))))
+(defvar slime-switch-to-output-buffer-search-all-frames t
+ "If t search for an already existing REPL window in all frames,
+and if found, select that window instead of creating a new one.
+
+If you use multiple screens, you may want to set this to nil such
+that a window on a different screen won't be selected under the
+hood.")
+
(defun slime-switch-to-output-buffer (&optional connection)
- "Select the output buffer, preferably in a different window."
- (interactive)
- (let ((slime-dispatching-connection (or connection
- slime-dispatching-connection)))
- (set-buffer (slime-output-buffer))
- (unless (eq (current-buffer) (window-buffer))
- (pop-to-buffer (current-buffer) t))
+ "Select the output buffer: If a REPL is already displayed, just
+set focus to that window. Otherwise, try to make a new window
+displaying the REPL."
+ (interactive)
+ (let ((slime-dispatching-connection (or connection
+ slime-dispatching-connection)))
+ (let* ((repl-buffer (slime-output-buffer))
+ (all-frames-p slime-switch-to-output-buffer-search-all-frames)
+ (repl-window (get-buffer-window repl-buffer all-frames-p)))
+ (if repl-window
+ (progn (select-frame-set-input-focus (window-frame repl-window))
+ (select-window repl-window))
+ (set-buffer repl-buffer)
+ (unless (eq (current-buffer) (window-buffer))
+ (pop-to-buffer (current-buffer) t))))
(goto-char (point-max))))
--- /project/slime/cvsroot/slime/ChangeLog 2008/08/14 11:46:39 1.1451
+++ /project/slime/cvsroot/slime/ChangeLog 2008/08/14 14:20:09 1.1452
@@ -1,5 +1,16 @@
2008-08-14 Tobias C. Rittweiler <tcr at freebits.de>
+ `C-c C-z' now selects an REPL displayed in another frame instead
+ of splitting the current frame, and displaying the REPL in the
+ newly created window.
+
+ * slime.el (slime-switch-to-output-buffer-search-all-frames): New
+ variable to customize this behaviour, as it may not be optimal for
+ people using multiple screens at once.
+ (slime-switch-to-output-buffer): Adapted accordingly.
+
+2008-08-14 Tobias C. Rittweiler <tcr at freebits.de>
+
Xref buffers: `M-,' in an Xref buffer will now revert to an Emacs
state as of before the Xref command.
More information about the slime-cvs
mailing list