From: Torsten Hilbrich Date: Thu, 19 Nov 2020 20:45:25 +0000 (+0100) Subject: Show error message when asking to match for nothing X-Git-Tag: emacs-28.0.90~4726^2~13 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=81ebe86d8d;p=emacs.git 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. --- diff --git a/lisp/net/dictionary.el b/lisp/net/dictionary.el index 12b11cb5111..d910dab1600 100644 --- a/lisp/net/dictionary.el +++ b/lisp/net/dictionary.el @@ -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))