Avoid signaling errors in 'dabbrev-capf'

* lisp/dabbrev.el (dabbrev-capf): Call
'dabbrev--reset-global-variables' if necessary.  (Bug#61274)
This commit is contained in:
Eli Zaretskii 2025-09-20 13:15:59 +03:00
parent 66308637d7
commit 6570c746fe

View file

@ -400,6 +400,8 @@ then it searches *all* buffers."
(defun dabbrev-capf ()
"Dabbrev completion function for `completion-at-point-functions'."
(or (stringp dabbrev--abbrev-char-regexp)
(dabbrev--reset-global-variables))
(let* ((abbrev (dabbrev--abbrev-at-point))
(beg (progn (search-backward abbrev) (point)))
(end (progn (search-forward abbrev) (point)))