1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-02 02:10:46 -08:00

Show error message when asking to match for nothing

* lisp/net/dictionary.el (dictionary-popup-matching-words): Show error
if neither the parameter nor the word at point are defined

This avoids an error later on when the nil value is used as string
within dictionary-encode-charset.
This commit is contained in:
Torsten Hilbrich 2020-11-19 21:45:25 +01:00
parent 09952ce434
commit 81ebe86d8d

View file

@ -1179,7 +1179,7 @@ It presents the word at point as default input and allows editing it."
(defun dictionary-popup-matching-words (&optional word)
"Display entries matching the word at the point"
(interactive)
(dictionary-do-matching (or word (current-word))
(dictionary-do-matching (or word (current-word) (error "Nothing to search for"))
dictionary-default-dictionary
dictionary-default-popup-strategy
'dictionary-process-popup-replies))