From: Eli Zaretskii Date: Tue, 20 Feb 2018 04:22:57 +0000 (+0200) Subject: Fix documentation of 'flyspell-auto-correct-word' X-Git-Tag: emacs-26.1-rc1~182 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=226aca32a784c4edebdec6a16eb90930aae64c06;p=emacs.git Fix documentation of 'flyspell-auto-correct-word' * lisp/textmodes/flyspell.el (flyspell-get-word): Elaborate in the doc string on how the function looks for the word to spell-check. (flyspell-word, flyspell-auto-correct-word): Refer to 'flyspell-get-word' for details about finding the word. (Bug#30462) --- diff --git a/lisp/textmodes/flyspell.el b/lisp/textmodes/flyspell.el index d7f0b0a7c19..aaa8ebfd480 100644 --- a/lisp/textmodes/flyspell.el +++ b/lisp/textmodes/flyspell.el @@ -1103,7 +1103,10 @@ If the optional argument FOLLOWING, or, when called interactively `ispell-following-word', is non-nil, checks the following (rather than preceding) word when the cursor is not over a word. If optional argument KNOWN-MISSPELLING is non nil considers word a -misspelling and skips redundant spell-checking step." +misspelling and skips redundant spell-checking step. + +See `flyspell-get-word' for details of how this finds the word to +spell-check." (interactive (list ispell-following-word)) (ispell-set-spellchecker-params) ; Initialize variables and dicts alists (save-excursion @@ -1302,7 +1305,13 @@ misspelling and skips redundant spell-checking step." Optional argument FOLLOWING non-nil means to get the following \(rather than preceding) word when the cursor is not over a word. Optional second argument EXTRA-OTHERCHARS is a regexp of characters -that may be included as part of a word (see `ispell-dictionary-alist')." +that may be included as part of a word (see `ispell-dictionary-alist'). + +This finds the word to spell-check by searching for CASECHARS defined +in `ispell-dictionary-alist' for the current dictionary. Thus, the +word could be far away of point if point is inside whitespace or +punctuation characters, or in text that belongs to a different +language." (let* ((flyspell-casechars (flyspell-get-casechars)) (flyspell-not-casechars (flyspell-get-not-casechars)) (ispell-otherchars (ispell-get-otherchars)) @@ -1919,8 +1928,10 @@ before point that's highlighted as misspelled." "Correct the current word. This command proposes various successive corrections for the current word. If invoked repeatedly on the same position, it -cycles through the possible corrections of the word at or near -that position." +cycles through the possible corrections of the current word. + +See `flyspell-get-word' for details of how this finds the word to +spell-check." (interactive) ;; If we are not in the construct where flyspell should be active, ;; invoke the original binding of M-TAB, if that was recorded.