aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/dabbrev.el12
1 files changed, 6 insertions, 6 deletions
diff --git a/lisp/dabbrev.el b/lisp/dabbrev.el
index b14a97bb64b..542f657fceb 100644
--- a/lisp/dabbrev.el
+++ b/lisp/dabbrev.el
@@ -788,12 +788,12 @@ See also `dabbrev-abbrev-char-regexp' and \\[dabbrev-completion]."
788 ;; Move buffers that are visible on the screen 788 ;; Move buffers that are visible on the screen
789 ;; to the front of the list. Remove the current buffer. 789 ;; to the front of the list. Remove the current buffer.
790 (when dabbrev--friend-buffer-list 790 (when dabbrev--friend-buffer-list
791 (let ((w (next-window (selected-window)))) 791 (walk-windows (lambda (w)
792 (while (not (eq w (selected-window))) 792 (unless (eq w (selected-window))
793 (setq dabbrev--friend-buffer-list 793 (setq dabbrev--friend-buffer-list
794 (cons (window-buffer w) 794 (cons (window-buffer w)
795 (delq (window-buffer w) dabbrev--friend-buffer-list))) 795 (delq (window-buffer w)
796 (setq w (next-window w)))) 796 dabbrev--friend-buffer-list))))))
797 (setq dabbrev--friend-buffer-list 797 (setq dabbrev--friend-buffer-list
798 (delq (current-buffer) dabbrev--friend-buffer-list))) 798 (delq (current-buffer) dabbrev--friend-buffer-list)))
799 ;; Walk through the buffers 799 ;; Walk through the buffers