]> git.eshelyaron.com Git - emacs.git/commitdiff
(dabbrev--find-expansion): Use walk-windows instead
authorGerd Moellmann <gerd@gnu.org>
Mon, 3 Jul 2000 09:13:06 +0000 (09:13 +0000)
committerGerd Moellmann <gerd@gnu.org>
Mon, 3 Jul 2000 09:13:06 +0000 (09:13 +0000)
of cycling through windows with next-window.

lisp/dabbrev.el

index b14a97bb64bc0d74422b5b884c79731b376f65c6..542f657fceb0b4ccc237f3e99457317b369f7f63 100644 (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