]> git.eshelyaron.com Git - emacs.git/commitdiff
Resurrect highlighting of repeated words by Flyspell Mode
authorEli Zaretskii <eliz@gnu.org>
Wed, 29 Jul 2015 17:52:23 +0000 (20:52 +0300)
committerEli Zaretskii <eliz@gnu.org>
Wed, 29 Jul 2015 17:52:23 +0000 (20:52 +0300)
* 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

index 2329f29bdcac6a28a20513e4f4a091473fcbbef1..e07491806116ca9ceefc824c57949bca9752d263 100644 (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)))))