aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2018-02-20 06:22:57 +0200
committerEli Zaretskii2018-02-20 06:22:57 +0200
commit226aca32a784c4edebdec6a16eb90930aae64c06 (patch)
tree1f1d965e03d560ca0d92ed1421279610a9b4b6d8
parenta8c843478c2152186b2ff438c0b891e575300411 (diff)
downloademacs-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.el19
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
1104than preceding) word when the cursor is not over a word. If 1104than preceding) word when the cursor is not over a word. If
1105optional argument KNOWN-MISSPELLING is non nil considers word a 1105optional argument KNOWN-MISSPELLING is non nil considers word a
1106misspelling and skips redundant spell-checking step." 1106misspelling and skips redundant spell-checking step.
1107
1108See `flyspell-get-word' for details of how this finds the word to
1109spell-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."
1302Optional argument FOLLOWING non-nil means to get the following 1305Optional 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.
1304Optional second argument EXTRA-OTHERCHARS is a regexp of characters 1307Optional second argument EXTRA-OTHERCHARS is a regexp of characters
1305that may be included as part of a word (see `ispell-dictionary-alist')." 1308that may be included as part of a word (see `ispell-dictionary-alist').
1309
1310This finds the word to spell-check by searching for CASECHARS defined
1311in `ispell-dictionary-alist' for the current dictionary. Thus, the
1312word could be far away of point if point is inside whitespace or
1313punctuation characters, or in text that belongs to a different
1314language."
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.
1920This command proposes various successive corrections for the 1929This command proposes various successive corrections for the
1921current word. If invoked repeatedly on the same position, it 1930current word. If invoked repeatedly on the same position, it
1922cycles through the possible corrections of the word at or near 1931cycles through the possible corrections of the current word.
1923that position." 1932
1933See `flyspell-get-word' for details of how this finds the word to
1934spell-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.