diff options
| author | Lars Ingebrigtsen | 2021-03-18 08:43:22 +0100 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2021-03-18 08:43:22 +0100 |
| commit | 790259f01a62c2b09385aa58a84198ea378ba83d (patch) | |
| tree | 21f4ff3b98a07670eff90c54a7f9e1093411d83c | |
| parent | 21e1a126b54390b5a22e5af836d14ae8f4e423fb (diff) | |
| download | emacs-790259f01a62c2b09385aa58a84198ea378ba83d.tar.gz 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).
| -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." | |||
| 721 | (if (dictionary-check-reply reply 552) | 721 | (if (dictionary-check-reply reply 552) |
| 722 | (progn | 722 | (progn |
| 723 | (unless nomatching | 723 | (unless nomatching |
| 724 | (beep) | 724 | (insert "Word not found") |
| 725 | (insert "Word not found, maybe you are looking " | 725 | (dictionary-do-matching |
| 726 | "for one of these words\n\n") | 726 | word |
| 727 | (dictionary-do-matching word | 727 | dictionary |
| 728 | dictionary | 728 | "." |
| 729 | "." | 729 | (lambda (reply) |
| 730 | 'dictionary-display-only-match-result) | 730 | (insert ", maybe you are looking for one of these words\n\n") |
| 731 | (dictionary-display-only-match-result reply))) | ||
| 731 | (dictionary-post-buffer))) | 732 | (dictionary-post-buffer))) |
| 732 | (if (dictionary-check-reply reply 550) | 733 | (if (dictionary-check-reply reply 550) |
| 733 | (error "Dictionary \"%s\" is unknown, please select an existing one" | 734 | (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]+\"." | |||
| 1074 | 1075 | ||
| 1075 | (defun dictionary-display-only-match-result (reply) | 1076 | (defun dictionary-display-only-match-result (reply) |
| 1076 | "Display the results from the current matches in REPLY without the headers." | 1077 | "Display the results from the current matches in REPLY without the headers." |
| 1077 | |||
| 1078 | (let ((number (nth 1 (dictionary-reply-list reply))) | 1078 | (let ((number (nth 1 (dictionary-reply-list reply))) |
| 1079 | (list (dictionary-simple-split-string (dictionary-read-answer) "\n+"))) | 1079 | (list (dictionary-simple-split-string (dictionary-read-answer) "\n+"))) |
| 1080 | (insert number " matching word" (if (equal number "1") "" "s") | 1080 | (insert number " matching word" (if (equal number "1") "" "s") |