]> git.eshelyaron.com Git - emacs.git/commitdiff
Make flyspell-check-word-p work better with delete-selection-mode
authorLars Ingebrigtsen <larsi@gnus.org>
Thu, 4 Aug 2022 06:16:45 +0000 (08:16 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Thu, 4 Aug 2022 06:16:45 +0000 (08:16 +0200)
* lisp/textmodes/flyspell.el (flyspell-check-word-p): Deactivate
the region immediately (bug#53773).

lisp/textmodes/flyspell.el

index 2c5e30fecd8f09ac21cf0042629cbd2844663a41..2ee20ef1d4597f51951cef47804dd9e0c61139da 100644 (file)
@@ -854,6 +854,9 @@ Mostly we check word delimiters."
        ((get this-command 'flyspell-deplacement)
        (not (eq flyspell-previous-command this-command)))
        ((get this-command 'flyspell-delayed)
+        ;; In case we're using `delete-selection-mode', make the
+        ;; region be updated immediately.
+        (deactivate-mark)
        ;; The current command is not delayed, that
        ;; is that we must check the word now.
        (and (not unread-command-events)