summaryrefslogtreecommitdiff
path: root/lisp/dabbrev.el
diff options
context:
space:
mode:
authorLars Ingebrigtsen <larsi@gnus.org>2022-05-13 14:29:48 +0200
committerLars Ingebrigtsen <larsi@gnus.org>2022-05-13 14:30:09 +0200
commitd0975d7db03c231a3db5a1cd0edaf41094d43f0d (patch)
tree1692dc7dc5927c367bea8bf1574c36ed3661bfe1 /lisp/dabbrev.el
parent36ae1c721ab4bd610087d353d6bd255a20b2f59b (diff)
downloademacs-d0975d7db03c231a3db5a1cd0edaf41094d43f0d.tar.gz
Fix dabbrev expansion after recent file-name buffer addition
* lisp/dabbrev.el (dabbrev--find-expansion): Remove the now-dead file name buffer from dabbrev--friend-buffer-list, so that we don't trip over the killed buffer later (bug introduced in 2d0085f756).
Diffstat (limited to 'lisp/dabbrev.el')
-rw-r--r--lisp/dabbrev.el5
1 files changed, 4 insertions, 1 deletions
diff --git a/lisp/dabbrev.el b/lisp/dabbrev.el
index 8f8d553cdab..215425f1367 100644
--- a/lisp/dabbrev.el
+++ b/lisp/dabbrev.el
@@ -802,7 +802,10 @@ of the start of the occurrence."
(progress-reporter-done dabbrev--progress-reporter)
expansion))
(when (buffer-live-p file-name-buffer)
- (kill-buffer file-name-buffer))))))))
+ (kill-buffer file-name-buffer))
+ (setq dabbrev--friend-buffer-list
+ (seq-filter #'buffer-live-p
+ dabbrev--friend-buffer-list))))))))
;; Compute the list of buffers to scan.
;; If dabbrev-search-these-buffers-only, then the current buffer