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)
This commit is contained in:
Eli Zaretskii 2015-07-29 20:52:23 +03:00
parent cafa012c8f
commit 33b779a11f

View file

@ -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)))))