# HG changeset patch # User Karl Heuer # Date 906587819 0 # Node ID 4beab023a902464767f3a8fdda3c30ba1014fa27 # Parent 61483b4c169c8d1abc7358be05cc16ab7e210808 (dabbrev--find-expansion): Don't scan the current buffer over again. diff -r 61483b4c169c -r 4beab023a902 lisp/dabbrev.el --- a/lisp/dabbrev.el Wed Sep 23 21:51:50 1998 +0000 +++ b/lisp/dabbrev.el Wed Sep 23 21:56:59 1998 +0000 @@ -768,14 +768,16 @@ (append dabbrev--friend-buffer-list non-friend-buffer-list))))) ;; Move buffers that are visible on the screen - ;; to the front of the list. - (if 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))))) + ;; 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)))) + (setq dabbrev--friend-buffer-list + (delq (current-buffer) dabbrev--friend-buffer-list))) ;; Walk through the buffers (while (and (not expansion) dabbrev--friend-buffer-list) (setq dabbrev--last-buffer