changeset 30004:531536b6475b

(server-switch-buffer): Use some-window instead of cycling through windows with next-window.
author Gerd Moellmann <gerd@gnu.org>
date Mon, 03 Jul 2000 09:13:42 +0000
parents 29a64f84d736
children 766caf49d6a9
files lisp/server.el
diffstat 1 files changed, 2 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/server.el	Mon Jul 03 09:13:23 2000 +0000
+++ b/lisp/server.el	Mon Jul 03 09:13:42 2000 +0000
@@ -477,10 +477,8 @@
   (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)