diff options
| author | Eli Zaretskii | 2018-02-20 06:22:57 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2018-02-20 06:22:57 +0200 |
| commit | 226aca32a784c4edebdec6a16eb90930aae64c06 (patch) | |
| tree | 1f1d965e03d560ca0d92ed1421279610a9b4b6d8 | |
| parent | a8c843478c2152186b2ff438c0b891e575300411 (diff) | |
| download | emacs-226aca32a784c4edebdec6a16eb90930aae64c06.tar.gz emacs-226aca32a784c4edebdec6a16eb90930aae64c06.zip | |
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)
| -rw-r--r-- | lisp/textmodes/flyspell.el | 19 |
1 files changed, 15 insertions, 4 deletions
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 | |||
| 1103 | `ispell-following-word', is non-nil, checks the following (rather | 1103 | `ispell-following-word', is non-nil, checks the following (rather |
| 1104 | than preceding) word when the cursor is not over a word. If | 1104 | than preceding) word when the cursor is not over a word. If |
| 1105 | optional argument KNOWN-MISSPELLING is non nil considers word a | 1105 | optional argument KNOWN-MISSPELLING is non nil considers word a |
| 1106 | misspelling and skips redundant spell-checking step." | 1106 | misspelling and skips redundant spell-checking step. |
| 1107 | |||
| 1108 | See `flyspell-get-word' for details of how this finds the word to | ||
| 1109 | spell-check." | ||
| 1107 | (interactive (list ispell-following-word)) | 1110 | (interactive (list ispell-following-word)) |
| 1108 | (ispell-set-spellchecker-params) ; Initialize variables and dicts alists | 1111 | (ispell-set-spellchecker-params) ; Initialize variables and dicts alists |
| 1109 | (save-excursion | 1112 | (save-excursion |
| @@ -1302,7 +1305,13 @@ misspelling and skips redundant spell-checking step." | |||
| 1302 | Optional argument FOLLOWING non-nil means to get the following | 1305 | Optional argument FOLLOWING non-nil means to get the following |
| 1303 | \(rather than preceding) word when the cursor is not over a word. | 1306 | \(rather than preceding) word when the cursor is not over a word. |
| 1304 | Optional second argument EXTRA-OTHERCHARS is a regexp of characters | 1307 | Optional second argument EXTRA-OTHERCHARS is a regexp of characters |
| 1305 | that may be included as part of a word (see `ispell-dictionary-alist')." | 1308 | that may be included as part of a word (see `ispell-dictionary-alist'). |
| 1309 | |||
| 1310 | This finds the word to spell-check by searching for CASECHARS defined | ||
| 1311 | in `ispell-dictionary-alist' for the current dictionary. Thus, the | ||
| 1312 | word could be far away of point if point is inside whitespace or | ||
| 1313 | punctuation characters, or in text that belongs to a different | ||
| 1314 | language." | ||
| 1306 | (let* ((flyspell-casechars (flyspell-get-casechars)) | 1315 | (let* ((flyspell-casechars (flyspell-get-casechars)) |
| 1307 | (flyspell-not-casechars (flyspell-get-not-casechars)) | 1316 | (flyspell-not-casechars (flyspell-get-not-casechars)) |
| 1308 | (ispell-otherchars (ispell-get-otherchars)) | 1317 | (ispell-otherchars (ispell-get-otherchars)) |
| @@ -1919,8 +1928,10 @@ before point that's highlighted as misspelled." | |||
| 1919 | "Correct the current word. | 1928 | "Correct the current word. |
| 1920 | This command proposes various successive corrections for the | 1929 | This command proposes various successive corrections for the |
| 1921 | current word. If invoked repeatedly on the same position, it | 1930 | current word. If invoked repeatedly on the same position, it |
| 1922 | cycles through the possible corrections of the word at or near | 1931 | cycles through the possible corrections of the current word. |
| 1923 | that position." | 1932 | |
| 1933 | See `flyspell-get-word' for details of how this finds the word to | ||
| 1934 | spell-check." | ||
| 1924 | (interactive) | 1935 | (interactive) |
| 1925 | ;; If we are not in the construct where flyspell should be active, | 1936 | ;; If we are not in the construct where flyspell should be active, |
| 1926 | ;; invoke the original binding of M-TAB, if that was recorded. | 1937 | ;; invoke the original binding of M-TAB, if that was recorded. |