Commit f9cc39a1 authored by Gerd Moellmann's avatar Gerd Moellmann
Browse files

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

of cycling through windows with next-window.
parent 7c0d9b89
......@@ -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)
(setq dabbrev--friend-buffer-list
(delq (current-buffer) dabbrev--friend-buffer-list)))
;; Walk through the buffers
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment