From 33b779a11fb6785944383aeeae44f77cb580ee37 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Wed, 29 Jul 2015 20:52:23 +0300 Subject: [PATCH] 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) --- lisp/textmodes/flyspell.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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))))) -- 2.39.5