From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#21157: 24.5; Flyspell does not highlight repeated words Date: Wed, 29 Jul 2015 20:53:57 +0300 Message-ID: <83zj2ex32i.fsf@gnu.org> References: <55B8FB3B.7060708@gmail.com> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1438192526 17976 80.91.229.3 (29 Jul 2015 17:55:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 29 Jul 2015 17:55:26 +0000 (UTC) Cc: 21157-done@debbugs.gnu.org To: Florent Marchand de Kerchove Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jul 29 19:55:15 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZKVZS-0008Rl-CM for geb-bug-gnu-emacs@m.gmane.org; Wed, 29 Jul 2015 19:55:14 +0200 Original-Received: from localhost ([::1]:36351 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZKVZR-000289-Mq for geb-bug-gnu-emacs@m.gmane.org; Wed, 29 Jul 2015 13:55:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44445) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZKVZK-0001wU-4G for bug-gnu-emacs@gnu.org; Wed, 29 Jul 2015 13:55:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZKVZG-0006hg-Bv for bug-gnu-emacs@gnu.org; Wed, 29 Jul 2015 13:55:06 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:60656) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZKVZG-0006gi-8c for bug-gnu-emacs@gnu.org; Wed, 29 Jul 2015 13:55:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1ZKVZG-0006wo-1m for bug-gnu-emacs@gnu.org; Wed, 29 Jul 2015 13:55:02 -0400 Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Wed, 29 Jul 2015 17:55:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 21157 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: confirmed Mail-Followup-To: 21157@debbugs.gnu.org, eliz@gnu.org, fmdkdd@gmail.com Original-Received: via spool by 21157-done@debbugs.gnu.org id=D21157.143819244826629 (code D ref 21157); Wed, 29 Jul 2015 17:55:01 +0000 Original-Received: (at 21157-done) by debbugs.gnu.org; 29 Jul 2015 17:54:08 +0000 Original-Received: from localhost ([127.0.0.1]:33868 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZKVYO-0006vR-07 for submit@debbugs.gnu.org; Wed, 29 Jul 2015 13:54:08 -0400 Original-Received: from mtaout28.012.net.il ([80.179.55.184]:46324) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZKVYL-0006vG-NP for 21157-done@debbugs.gnu.org; Wed, 29 Jul 2015 13:54:06 -0400 Original-Received: from conversion-daemon.mtaout28.012.net.il by mtaout28.012.net.il (HyperSendmail v2007.08) id <0NS900P00FQT2I00@mtaout28.012.net.il> for 21157-done@debbugs.gnu.org; Wed, 29 Jul 2015 20:54:08 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout28.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NS900LXDGE87H60@mtaout28.012.net.il>; Wed, 29 Jul 2015 20:54:08 +0300 (IDT) In-reply-to: <55B8FB3B.7060708@gmail.com> X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:105217 Archived-At: > Date: Wed, 29 Jul 2015 18:11:39 +0200 > From: Florent Marchand de Kerchove > > Start `emacs -Q', and turn on flyspell-mode with `M-x flyspell-mode > RET'. Type `the the '. > > The second `the' should be automatically highlighted by Flyspell as a > repeated word (red squiggles under the word). Under 24.5.1, there is no > highlighting. Thanks, fixed with the patch below. commit 33b779a11fb6785944383aeeae44f77cb580ee37 Author: Eli Zaretskii Date: Wed Jul 29 20:52:23 2015 +0300 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 2329f29..e074918 100644 --- a/lisp/textmodes/flyspell.el +++ b/lisp/textmodes/flyspell.el @@ -1119,7 +1119,8 @@ (defun flyspell-word (&optional following known-misspelling) (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)))))