> 2006-01-27 textmodes/flyspell.el > (flyspell-incorrect, flyspell-duplicate): Doc fix. Rather than reverting I'd propose to fix that as in the attached patch. That patch also simplifies the corresponding code and fixes a bug you should be able to reproduce as follows: (1) Set `flyspell-duplicate-distance' to 12 and enable `flyspell-mode'. (2) In an empty buffer insert the single line: worryin and worryin Both occurrences of "worryin" should get highlighted with `flyspell-duplicate' face. (3) Correct the second occurrence of "worryin" to "worrying". Thus your line should read as: worryin and worrying with the highlighting removed from the second occurrence. (4) Moving the cursor to the first "worryin" should get you now Error in post-command-hook: (error Invalid search bound (wrong side of point)) virtually disabling `flyspell-mode'. The bug is caused within (defun flyspell-word-search-forward (word bound) (save-excursion (let ((r '()) (inhibit-point-motion-hooks t) p) (while (and (not r) (setq p (search-forward word bound t))) (let ((lw (flyspell-get-word '()))) (if (and (consp lw) (string-equal (car lw) word)) (setq r p) (goto-char (1+ p))))) r))) Note that the string " and worryin" contains exactly 12 characters. `search-forward' stops after having found the second "worryin" but the subsequent conditional fails since "worrying is correct". `bound' still refers to the position after "worryin" but `point' gets set to the position after "worrying" raising the wrong side of point error.