aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/textmodes
diff options
context:
space:
mode:
authorAaron Jensen2018-03-14 08:09:50 -0700
committerEli Zaretskii2018-03-20 17:09:04 +0200
commitd13a0dd273dc5f6221419267b0f5accc5f257802 (patch)
treeff0f8f24ed65f9ed96c069adc10b555e1da6cafe /lisp/textmodes
parentb39ca55e294d3be3e4c6e142975256d7f8cdfe76 (diff)
downloademacs-d13a0dd273dc5f6221419267b0f5accc5f257802.tar.gz
emacs-d13a0dd273dc5f6221419267b0f5accc5f257802.zip
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')
-rw-r--r--lisp/textmodes/flyspell.el5
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."
982 (let ((command this-command) 982 (let ((command this-command)
983 ;; Prevent anything we do from affecting the mark. 983 ;; Prevent anything we do from affecting the mark.
984 deactivate-mark) 984 deactivate-mark)
985 (if (and (eq command 'transpose-chars)
986 flyspell-pre-point)
987 (save-excursion
988 (goto-char (- flyspell-pre-point 1))
989 (flyspell-word)))
985 (if (flyspell-check-pre-word-p) 990 (if (flyspell-check-pre-word-p)
986 (save-excursion 991 (save-excursion
987 '(flyspell-debug-signal-pre-word-checked) 992 '(flyspell-debug-signal-pre-word-checked)