]> git.eshelyaron.com Git - emacs.git/commitdiff
Show error message when asking to match for nothing
authorTorsten Hilbrich <torsten.hilbrich@gmx.net>
Thu, 19 Nov 2020 20:45:25 +0000 (21:45 +0100)
committerTorsten Hilbrich <torsten.hilbrich@gmx.net>
Mon, 14 Dec 2020 10:45:24 +0000 (11:45 +0100)
* 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.

lisp/net/dictionary.el

index 12b11cb5111dac849dab8873394f04f55b630252..d910dab1600fd52ec303a4cec2da1e067bbda7f6 100644 (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))