From: Eli Zaretskii Date: Wed, 29 Jul 2015 17:52:23 +0000 (+0300) Subject: Resurrect highlighting of repeated words by Flyspell Mode X-Git-Tag: emacs-25.0.90~1418 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=33b779a11fb6785944383aeeae44f77cb580ee37;p=emacs.git 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) --- 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)))))