aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTorsten Hilbrich2020-11-19 21:45:25 +0100
committerTorsten Hilbrich2020-12-14 11:45:24 +0100
commit81ebe86d8deace5cc39979a42dcf062bdaa830c4 (patch)
treebb73a4d5af49357af028a9baec07f01171108de6
parent09952ce43451b76a0f7839e35d033fbbfa078e31 (diff)
downloademacs-81ebe86d8deace5cc39979a42dcf062bdaa830c4.tar.gz
emacs-81ebe86d8deace5cc39979a42dcf062bdaa830c4.zip
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.
-rw-r--r--lisp/net/dictionary.el2
1 files changed, 1 insertions, 1 deletions
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."
1179(defun dictionary-popup-matching-words (&optional word) 1179(defun dictionary-popup-matching-words (&optional word)
1180 "Display entries matching the word at the point" 1180 "Display entries matching the word at the point"
1181 (interactive) 1181 (interactive)
1182 (dictionary-do-matching (or word (current-word)) 1182 (dictionary-do-matching (or word (current-word) (error "Nothing to search for"))
1183 dictionary-default-dictionary 1183 dictionary-default-dictionary
1184 dictionary-default-popup-strategy 1184 dictionary-default-popup-strategy
1185 'dictionary-process-popup-replies)) 1185 'dictionary-process-popup-replies))