summaryrefslogtreecommitdiff
path: root/lisp/server.el
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1994-10-04 04:20:21 +0000
committerRichard M. Stallman <rms@gnu.org>1994-10-04 04:20:21 +0000
commit70375b08e7ca87d0009af0a60e2682e0513608cd (patch)
tree2eefd7987f593b229ed815ae78ea2a101e71f311 /lisp/server.el
parent5090accfa8d41ab71e1666ffc3bc2541ce51ff56 (diff)
downloademacs-70375b08e7ca87d0009af0a60e2682e0513608cd.tar.gz
(server-switch-buffer): Don't go to an invisible frame.
Move to a non-dedicated window if possible. Otherwise, make the window non-dedicated.
Diffstat (limited to 'lisp/server.el')
-rw-r--r--lisp/server.el9
1 files changed, 7 insertions, 2 deletions
diff --git a/lisp/server.el b/lisp/server.el
index 0e525a60fd4..2c95453d651 100644
--- a/lisp/server.el
+++ b/lisp/server.el
@@ -331,7 +331,6 @@ which filenames are considered temporary.
If invoked with a prefix argument, or if there is no server process running,
starts server process and that is all. Invoked by \\[server-edit]."
-
(interactive "P")
(if (or arg
(not server-process)
@@ -347,7 +346,13 @@ Arg NEXT-BUFFER is a suggestion; if it is a live buffer, use it."
((framep server-window)
(select-window (frame-selected-window server-window))))
(if (window-minibuffer-p (selected-window))
- (select-window (next-window nil 'nomini t)))
+ (select-window (next-window nil 'nomini 0)))
+ ;; Move to a non-dedicated window, if we have one.
+ (let ((last-window (previous-window nil 'nomini 0)))
+ (while (and (window-dedicated-p (selected-window))
+ (not (eq last-window (selected-window))))
+ (select-window (next-window nil 'nomini 0))))
+ (set-window-dedicated-p (selected-window) nil)
(if next-buffer
(if (and (bufferp next-buffer)
(buffer-name next-buffer))