# HG changeset patch # User Richard M. Stallman # Date 781244421 0 # Node ID 8c659649649ea17781b1500efdefcc8acc080b1d # Parent 2ecfcd3f778c7f946c647a1290de6a87703f3b8e (server-switch-buffer): Don't go to an invisible frame. Move to a non-dedicated window if possible. Otherwise, make the window non-dedicated. diff -r 2ecfcd3f778c -r 8c659649649e lisp/server.el --- a/lisp/server.el Tue Oct 04 02:56:49 1994 +0000 +++ b/lisp/server.el Tue Oct 04 04:20:21 1994 +0000 @@ -331,7 +331,6 @@ 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 @@ ((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))