diff options
author | Lars Ingebrigtsen <larsi@gnus.org> | 2021-03-18 08:43:22 +0100 |
---|---|---|
committer | Lars Ingebrigtsen <larsi@gnus.org> | 2021-03-18 08:43:22 +0100 |
commit | 790259f01a62c2b09385aa58a84198ea378ba83d (patch) | |
tree | 21f4ff3b98a07670eff90c54a7f9e1093411d83c /lisp/net/dictionary.el | |
parent | 21e1a126b54390b5a22e5af836d14ae8f4e423fb (diff) | |
download | emacs-790259f01a62c2b09385aa58a84198ea378ba83d.tar.gz emacs-790259f01a62c2b09385aa58a84198ea378ba83d.tar.bz2 emacs-790259f01a62c2b09385aa58a84198ea378ba83d.zip |
Make "not found" message in dictionary less misleading
* lisp/net/dictionary.el (dictionary-do-search): Don't say there
are more words when there aren't (bug#47056).
Diffstat (limited to 'lisp/net/dictionary.el')
-rw-r--r-- | lisp/net/dictionary.el | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/lisp/net/dictionary.el b/lisp/net/dictionary.el index 5938b8146ef..f33cbaf1126 100644 --- a/lisp/net/dictionary.el +++ b/lisp/net/dictionary.el @@ -721,13 +721,14 @@ of matching words." (if (dictionary-check-reply reply 552) (progn (unless nomatching - (beep) - (insert "Word not found, maybe you are looking " - "for one of these words\n\n") - (dictionary-do-matching word - dictionary - "." - 'dictionary-display-only-match-result) + (insert "Word not found") + (dictionary-do-matching + word + dictionary + "." + (lambda (reply) + (insert ", maybe you are looking for one of these words\n\n") + (dictionary-display-only-match-result reply))) (dictionary-post-buffer))) (if (dictionary-check-reply reply 550) (error "Dictionary \"%s\" is unknown, please select an existing one" @@ -1074,7 +1075,6 @@ If PATTERN is omitted, it defaults to \"[ \\f\\t\\n\\r\\v]+\"." (defun dictionary-display-only-match-result (reply) "Display the results from the current matches in REPLY without the headers." - (let ((number (nth 1 (dictionary-reply-list reply))) (list (dictionary-simple-split-string (dictionary-read-answer) "\n+"))) (insert number " matching word" (if (equal number "1") "" "s") |