1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-17 17:58:46 +00:00

(dabbrev--find-expansion): Use walk-windows instead

of cycling through windows with next-window.
This commit is contained in:
Gerd Moellmann 2000-07-03 09:13:06 +00:00
parent 7c0d9b8972
commit f9cc39a188

View File

@ -788,12 +788,12 @@ See also `dabbrev-abbrev-char-regexp' and \\[dabbrev-completion]."
;; 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