emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] feature/gnus-select 98cca72 140/218: Better support for 't


From: Andrew G Cohen
Subject: [Emacs-diffs] feature/gnus-select 98cca72 140/218: Better support for 'transpose-chars' in Flyspell mode
Date: Fri, 14 Dec 2018 03:35:17 -0500 (EST)

branch: feature/gnus-select
commit 98cca7258d764449d0bf4bffb86d38611f0fe3e7
Author: Aaron Jensen <address@hidden>
Commit: Andrew G Cohen <address@hidden>

    Better support for 'transpose-chars' in Flyspell mode
    
    * lisp/textmodes/flyspell.el (flyspell-post-command-hook): Check
    word  before previous point location after 'transpose-chars'.
    (Bug#30813)
---
 lisp/textmodes/flyspell.el | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/lisp/textmodes/flyspell.el b/lisp/textmodes/flyspell.el
index e462669..b5c8414 100644
--- a/lisp/textmodes/flyspell.el
+++ b/lisp/textmodes/flyspell.el
@@ -982,6 +982,11 @@ Mostly we check word delimiters."
       (let ((command this-command)
             ;; Prevent anything we do from affecting the mark.
             deactivate-mark)
+        (if (and (eq command 'transpose-chars)
+                 flyspell-pre-point)
+            (save-excursion
+              (goto-char (- flyspell-pre-point 1))
+              (flyspell-word)))
         (if (flyspell-check-pre-word-p)
             (save-excursion
               '(flyspell-debug-signal-pre-word-checked)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]