summaryrefslogtreecommitdiff
path: root/lisp/server.el
diff options
context:
space:
mode:
authorGerd Moellmann <gerd@gnu.org>2000-07-03 09:13:42 +0000
committerGerd Moellmann <gerd@gnu.org>2000-07-03 09:13:42 +0000
commit6d4dd885045333b78e1906fc356203be7ae5c404 (patch)
tree09bfa3e6d22af7c833fa8894e64485a8c43e1b83 /lisp/server.el
parent8822bfb631aaedb65080c1dfc325a764f8bfb1e0 (diff)
downloademacs-6d4dd885045333b78e1906fc356203be7ae5c404.tar.gz
(server-switch-buffer): Use some-window instead of
cycling through windows with next-window.
Diffstat (limited to 'lisp/server.el')
-rw-r--r--lisp/server.el6
1 files changed, 2 insertions, 4 deletions
diff --git a/lisp/server.el b/lisp/server.el
index 4a133f529c0..9f3aee40b88 100644
--- a/lisp/server.el
+++ b/lisp/server.el
@@ -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)