aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/textmodes
diff options
context:
space:
mode:
authorGlenn Morris2018-02-20 07:50:29 -0800
committerGlenn Morris2018-02-20 07:50:29 -0800
commit650febcd3ec1cfe0c686414c9c8f1a7caaeefe71 (patch)
tree534fc96cc86b769db3e2124b347b7be5e155d94d /lisp/textmodes
parent3d42272754db914d4f2dbbcfba5ce6776a7b232b (diff)
parent226aca32a784c4edebdec6a16eb90930aae64c06 (diff)
downloademacs-650febcd3ec1cfe0c686414c9c8f1a7caaeefe71.tar.gz
emacs-650febcd3ec1cfe0c686414c9c8f1a7caaeefe71.zip
Merge from origin/emacs-26
226aca3 (origin/emacs-26) Fix documentation of 'flyspell-auto-correct... a8c8434 * doc/emacs/misc.texi (Saving Emacs Sessions): Fix markup. 275e735 More changes in the Emacs manuals d962be5 More fixes in the Emacs manual 6dc2846 * src/data.c (Faref): Fix a typo in the doc string. (Bug#30510) 36e729f Minor edit in tramp.texi 6537f99 ; Fix oversight from last commit eb94588 ; * doc/emacs/maintaining.texi: Fix two typos. 258135f More improvements in the Emacs manual f138bca Improve documentation of 'electric-pair-mode' f74ab96 ; Spelling and grammar fixes. 42f9dc4 ; * lisp/textmodes/flyspell.el (flyspell-auto-correct-word): ...
Diffstat (limited to 'lisp/textmodes')
-rw-r--r--lisp/textmodes/flyspell.el21
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
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.
@@ -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))