# HG changeset patch # User Gerd Moellmann # Date 962615586 0 # Node ID edb654a13bf12a746e0b0b0fce69099c14072f80 # Parent 55656f797f829028e01f985dab37bea739c66716 (dabbrev--find-expansion): Use walk-windows instead of cycling through windows with next-window. diff -r 55656f797f82 -r edb654a13bf1 lisp/dabbrev.el --- 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