1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-11 16:08:13 +00:00

(server-switch-buffer): Use some-window instead of

cycling through windows with next-window.
This commit is contained in:
Gerd Moellmann 2000-07-03 09:13:42 +00:00
parent 8822bfb631
commit 6d4dd88504

View File

@ -477,10 +477,8 @@ Arg NEXT-BUFFER is a suggestion; if it is a live buffer, use it."
(if (window-minibuffer-p (selected-window))
(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))))
(select-window (some-window (lambda (w) (not (window-dedicated-p w)))
'nomini 0 (selected-window)))
(set-window-dedicated-p (selected-window) nil)
(if next-buffer
(if (and (bufferp next-buffer)