changeset 30002:edb654a13bf1

(dabbrev--find-expansion): Use walk-windows instead of cycling through windows with next-window.
author Gerd Moellmann <gerd@gnu.org>
date Mon, 03 Jul 2000 09:13:06 +0000
parents 55656f797f82
children 29a64f84d736
files lisp/dabbrev.el
diffstat 1 files changed, 6 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/dabbrev.el	Mon Jul 03 09:12:39 2000 +0000
+++ b/lisp/dabbrev.el	Mon Jul 03 09:13:06 2000 +0000
@@ -788,12 +788,12 @@
 	;; Move buffers that are visible on the screen
 	;; to the front of the list.  Remove the current buffer.
 	(when dabbrev--friend-buffer-list
-	  (let ((w (next-window (selected-window))))
-	    (while (not (eq w (selected-window)))
-	      (setq dabbrev--friend-buffer-list
-		    (cons (window-buffer w)
-			  (delq (window-buffer w) dabbrev--friend-buffer-list)))
-	      (setq w (next-window w))))
+	  (walk-windows (lambda (w)
+			  (unless (eq w (selected-window))
+			    (setq dabbrev--friend-buffer-list
+				  (cons (window-buffer w)
+					(delq (window-buffer w)
+					      dabbrev--friend-buffer-list))))))
 	  (setq dabbrev--friend-buffer-list
 		(delq (current-buffer) dabbrev--friend-buffer-list)))
 	;; Walk through the buffers