]> git.eshelyaron.com Git - emacs.git/commitdiff
(server-switch-buffer): Use some-window instead of
authorGerd Moellmann <gerd@gnu.org>
Mon, 3 Jul 2000 09:13:42 +0000 (09:13 +0000)
committerGerd Moellmann <gerd@gnu.org>
Mon, 3 Jul 2000 09:13:42 +0000 (09:13 +0000)
cycling through windows with next-window.

lisp/server.el

index 4a133f529c01da41e6976a4bcd4b9b1585e32bae..9f3aee40b8828b4021f866cc7e9ef73a05b4be67 100644 (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)