From 81ebe86d8deace5cc39979a42dcf062bdaa830c4 Mon Sep 17 00:00:00 2001 From: Torsten Hilbrich Date: Thu, 19 Nov 2020 21:45:25 +0100 Subject: [PATCH] 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. --- lisp/net/dictionary.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)) -- 2.39.2