aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorRichard M. Stallman1995-10-20 20:48:00 +0000
committerRichard M. Stallman1995-10-20 20:48:00 +0000
commitd8f7e85aba112ee75077152e566545058cf4a755 (patch)
tree002916ffbab55d28f8ea0897d32d122ab8f78ece /lisp
parent3132e11599f4b3792f1a0dfebf91a1d52422160e (diff)
downloademacs-d8f7e85aba112ee75077152e566545058cf4a755.tar.gz
emacs-d8f7e85aba112ee75077152e566545058cf4a755.zip
(dabbrev--find-expansion): Move buffers that are visible on the screen
to the front of the list to be searched.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/dabbrev.el9
1 files changed, 9 insertions, 0 deletions
diff --git a/lisp/dabbrev.el b/lisp/dabbrev.el
index 8dbe0629239..234f83f24b3 100644
--- a/lisp/dabbrev.el
+++ b/lisp/dabbrev.el
@@ -711,6 +711,15 @@ See also `dabbrev-abbrev-char-regexp' and \\[dabbrev-completion]."
711 dabbrev--friend-buffer-list 711 dabbrev--friend-buffer-list
712 (append dabbrev--friend-buffer-list 712 (append dabbrev--friend-buffer-list
713 non-friend-buffer-list))))) 713 non-friend-buffer-list)))))
714 ;; Move buffers that are visible on the screen
715 ;; to the front of the list.
716 (if dabbrev--friend-buffer-list
717 (let ((w (next-window (selected-window))))
718 (while (not (eq w (selected-window)))
719 (setq dabbrev--friend-buffer-list
720 (cons (window-buffer w)
721 (delq (window-buffer w) dabbrev--friend-buffer-list)))
722 (setq w (next-window w)))))
714 ;; Walk through the buffers 723 ;; Walk through the buffers
715 (while (and (not expansion) dabbrev--friend-buffer-list) 724 (while (and (not expansion) dabbrev--friend-buffer-list)
716 (setq dabbrev--last-buffer 725 (setq dabbrev--last-buffer