]> git.eshelyaron.com Git - emacs.git/commitdiff
; Fix documentation of 'flyspell-check-changes'
authorEli Zaretskii <eliz@gnu.org>
Fri, 15 Mar 2024 08:44:23 +0000 (10:44 +0200)
committerEshel Yaron <me@eshelyaron.com>
Fri, 15 Mar 2024 09:07:20 +0000 (10:07 +0100)
* lisp/textmodes/flyspell.el (flyspell-check-changes): Doc fixes.

* etc/NEWS: Improve wording of entry for 'flyspell-check-changes'.

(cherry picked from commit 1c4233b9a391ba5d5746acf6b6fd4b352b8c3a58)

etc/NEWS
lisp/textmodes/flyspell.el

index 4556ad148ef9144080c67ffe98ccc7072a75322a..dc7daf74d968d6e563b591e1782c3ba612ec93cd 100644 (file)
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -1230,7 +1230,8 @@ mouse to consult an error message.
 ** Flyspell
 
 *** New user option 'flyspell-check-changes'.
-It checks only edited text.
+When non-nil, Flyspell mode spell-checks only words that you edited; it
+does not check unedited words just because you move point across them.
 
 ** JS mode.
 The binding 'M-.' has been removed from the major mode keymaps in
index d64e4d601f72a7f72fe65eb57eb7cf0aaf382d1e..09d4e8a8d1a293e97dc8a5a837651e577aeb8e9b 100644 (file)
@@ -289,8 +289,11 @@ If this variable is nil, all regions are treated as small."
   :type 'key-sequence)
 
 (defcustom flyspell-check-changes nil
-  "Check only on moving point from the edited word.
-Unlike the default behavior, don't check when moving point without editing."
+  "If non-nil, spell-check only words that were edited.
+By default, this is nil, and Flyspell checks every word across which
+you move point, even if you haven't edited the word.  Customizing this
+option to a non-nil value will not flag mis-spelled words across which
+you move point without editing them."
   :type 'boolean
   :version "30.1")
 
@@ -1000,9 +1003,10 @@ Mostly we check word delimiters."
         (setq flyspell-previous-command command)))))
 
 (defun flyspell-check-changes ()
-  "The `post-command-hook' used by flyspell to check only edits.
-It checks only on moving point from the edited word,
-not when moving point without editing."
+  "Function to spell-check only edited words when point moves off the word.
+This is installed by flyspell as `post-command-hook' when the user
+option `flyspell-check-changes' is non-nil.  It spell-checks a word
+on moving point from the word only if the word was edited before the move."
   (when flyspell-mode
     (with-local-quit
       (when (consp flyspell-changes)