diff options
author | Aaron Jensen <aaronjensen@gmail.com> | 2018-03-14 08:09:50 -0700 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2018-03-20 17:09:04 +0200 |
commit | d13a0dd273dc5f6221419267b0f5accc5f257802 (patch) | |
tree | ff0f8f24ed65f9ed96c069adc10b555e1da6cafe /lisp/textmodes/flyspell.el | |
parent | b39ca55e294d3be3e4c6e142975256d7f8cdfe76 (diff) | |
download | emacs-d13a0dd273dc5f6221419267b0f5accc5f257802.tar.gz |
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)
Diffstat (limited to 'lisp/textmodes/flyspell.el')
-rw-r--r-- | lisp/textmodes/flyspell.el | 5 |
1 files changed, 5 insertions, 0 deletions
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) |