Mercurial > emacs
changeset 13257:679fc0917c11
(dabbrev--find-expansion): Move buffers that are visible on the screen
to the front of the list to be searched.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Fri, 20 Oct 1995 20:48:00 +0000 |
parents | d9c469af1ee0 |
children | 2a96bf08bccb |
files | lisp/dabbrev.el |
diffstat | 1 files changed, 9 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/dabbrev.el Fri Oct 20 20:30:22 1995 +0000 +++ b/lisp/dabbrev.el Fri Oct 20 20:48:00 1995 +0000 @@ -711,6 +711,15 @@ dabbrev--friend-buffer-list (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))))) ;; Walk through the buffers (while (and (not expansion) dabbrev--friend-buffer-list) (setq dabbrev--last-buffer