summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2015-07-29 20:52:23 +0300
committerEli Zaretskii <eliz@gnu.org>2015-07-29 20:52:23 +0300
commit33b779a11fb6785944383aeeae44f77cb580ee37 (patch)
tree0103a87bfc275b71b4781520ac81e48eeef94772
parentcafa012c8f745ef4dada889813f8b7f982c1ea9f (diff)
downloademacs-33b779a11fb6785944383aeeae44f77cb580ee37.tar.gz
Resurrect highlighting of repeated words by Flyspell Mode
* lisp/textmodes/flyspell.el (flyspell-word): Leave some non-word characters between point and the doublon candidate, so that flyspell-word-search-backward finds it. (Bug#21157)
-rw-r--r--lisp/textmodes/flyspell.el3
1 files changed, 2 insertions, 1 deletions
diff --git a/lisp/textmodes/flyspell.el b/lisp/textmodes/flyspell.el
index 2329f29bdca..e0749180611 100644
--- a/lisp/textmodes/flyspell.el
+++ b/lisp/textmodes/flyspell.el
@@ -1119,7 +1119,8 @@ misspelling and skips redundant spell-checking step."
(let* ((bound
(- start
(- end start)
- (- (skip-chars-backward " \t\n\f"))))
+ (- (save-excursion
+ (skip-chars-backward " \t\n\f")))))
(p (when (>= bound (point-min))
(flyspell-word-search-backward word bound t))))
(and p (/= p start)))))