diff --git a/lisp/dabbrev.el b/lisp/dabbrev.el index bbe6a64b626..84306fb3ae7 100644 --- a/lisp/dabbrev.el +++ b/lisp/dabbrev.el @@ -472,8 +472,10 @@ dabbrev-expand ;; minibuffer. (window-buffer (get-mru-window))) ;; Otherwise, if we found the expansion in another - ;; buffer, use that buffer for further expansions. - (dabbrev--last-buffer-found dabbrev--last-buffer-found) + ;; buffer and that buffer is still live, use that + ;; buffer for further expansions. + ((buffer-live-p dabbrev--last-buffer-found) + dabbrev--last-buffer-found) ;; Otherwise, use the buffer where we invoked ;; dabbrev-expand. (t (current-buffer))))