From fa47d79686438467deae169e206af0be1bf5ff1d Mon Sep 17 00:00:00 2001 From: Dmitry Gutov Date: Sat, 9 Nov 2013 03:12:25 +0200 Subject: [PATCH] * lisp/textmodes/ispell.el (ispell-lookup-words): When `look' is not available and the word has no wildcards, append one to the grep pattern. http://lists.gnu.org/archive/html/emacs-devel/2013-11/msg00258.html (ispell-complete-word): Call `ispell-lookup-words' with the value independent of `ispell-look-p'. --- lisp/ChangeLog | 9 +++++++++ lisp/textmodes/ispell.el | 9 ++++++--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 794b13d752b..6ac129e6a27 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,12 @@ +2013-11-09 Dmitry Gutov + + * textmodes/ispell.el (ispell-lookup-words): When `look' is not + available and the word has no wildcards, append one to the grep + pattern. + http://lists.gnu.org/archive/html/emacs-devel/2013-11/msg00258.html + (ispell-complete-word): Call `ispell-lookup-words' with the value + independent of `ispell-look-p'. + 2013-11-08 Dmitry Gutov * progmodes/ruby-mode.el (ruby-smie--implicit-semi-p): diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el index a361bdae64b..651aaa26688 100644 --- a/lisp/textmodes/ispell.el +++ b/lisp/textmodes/ispell.el @@ -2649,8 +2649,12 @@ if defined." (message "Starting \"%s\" process..." (file-name-nondirectory prog)) (if look-p nil + (insert "^" word) + ;; When there are no wildcards, append one, for consistency + ;; with `look' behavior. + (unless wild-p (insert "*")) + (insert "$") ;; Convert * to .* - (insert "^" word "$") (while (search-backward "*" nil t) (insert ".")) (setq word (buffer-string)) (erase-buffer)) @@ -3785,8 +3789,7 @@ Standard ispell choices are then available." (or (string= word "") ; Will give you every word (ispell-lookup-words (concat (and interior-frag "*") word - (if (or interior-frag (null ispell-look-p)) - "*")) + (and interior-frag "*")) (or ispell-complete-word-dict ispell-alternate-dictionary)))) (cond ((eq possibilities t) -- 2.39.2