(dabbrev-completion): Improve last fix for bug#80645

* lisp/dabbrev.el (dabbrev-completion): Signal the error that
`dabbrev-capf` doesn't signal any more.
This commit is contained in:
Daniel Mendler 2026-03-22 10:58:40 -04:00 committed by Stefan Monnier
parent 55bf30e017
commit c96c89faaa

View file

@ -398,7 +398,11 @@ then it searches *all* buffers."
;; Set it so `dabbrev-capf' won't reset the vars.
(setq dabbrev--last-abbrev-location (point-marker))
(let ((completion-at-point-functions '(dabbrev-capf)))
(completion-at-point)))
(unless (completion-at-point)
(user-error "No dynamic expansion for \"%s\" found%s"
(dabbrev--abbrev-at-point)
(if dabbrev--check-other-buffers
"" " in this-buffer")))))
(defun dabbrev-capf ()
"Dabbrev completion function for `completion-at-point-functions'."