diff options
Diffstat (limited to 'lisp/textmodes')
| -rw-r--r-- | lisp/textmodes/flyspell.el | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/lisp/textmodes/flyspell.el b/lisp/textmodes/flyspell.el index 5568bbb1d97..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. |
| @@ -2000,7 +2011,7 @@ that position." | |||
| 2000 | (let ((new-word replace)) | 2011 | (let ((new-word replace)) |
| 2001 | (if (not (equal new-word (car poss))) | 2012 | (if (not (equal new-word (car poss))) |
| 2002 | (progn | 2013 | (progn |
| 2003 | ;; the save the current replacements | 2014 | ;; then save the current replacements |
| 2004 | (setq flyspell-auto-correct-region | 2015 | (setq flyspell-auto-correct-region |
| 2005 | (cons start (length new-word))) | 2016 | (cons start (length new-word))) |
| 2006 | (let ((l replacements)) | 2017 | (let ((l replacements)) |