From: Aaron Jensen Date: Wed, 14 Mar 2018 15:09:50 +0000 (-0700) Subject: Better support for 'transpose-chars' in Flyspell mode X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1^2~5^2~19^2~5841 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=d13a0dd273dc5f6221419267b0f5accc5f257802;p=emacs.git 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) --- diff --git a/lisp/textmodes/flyspell.el b/lisp/textmodes/flyspell.el index e4626696262..b5c841403a1 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)