From unknown Sat Sep 06 00:11:09 2025 X-Loop: help-debbugs@gnu.org Subject: bug#6761: 23.2; flyspell-prog-mode in TeX mode Resent-From: Leo Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 30 Jul 2010 05:26:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 6761 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 6761@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.12804675559828 (code B ref -1); Fri, 30 Jul 2010 05:26:02 +0000 Received: (at submit) by debbugs.gnu.org; 30 Jul 2010 05:25:55 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Oei6U-0002YT-AH for submit@debbugs.gnu.org; Fri, 30 Jul 2010 01:25:54 -0400 Received: from mx10.gnu.org ([199.232.76.166]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Oei6S-0002YO-4W for submit@debbugs.gnu.org; Fri, 30 Jul 2010 01:25:52 -0400 Received: from lists.gnu.org ([199.232.76.165]:53001) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Oei6g-0001xl-UO for submit@debbugs.gnu.org; Fri, 30 Jul 2010 01:26:07 -0400 Received: from [140.186.70.92] (port=46484 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Oei6f-00081L-FB for bug-gnu-emacs@gnu.org; Fri, 30 Jul 2010 01:26:06 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_MED,T_RP_MATCHES_RCVD,T_TO_NO_BRKTS_FREEMAIL autolearn=unavailable version=3.3.1 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Oei6e-0007dL-Ar for bug-gnu-emacs@gnu.org; Fri, 30 Jul 2010 01:26:05 -0400 Received: from ppsw-32.csi.cam.ac.uk ([131.111.8.132]:58338) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Oei6e-0007dD-4c for bug-gnu-emacs@gnu.org; Fri, 30 Jul 2010 01:26:04 -0400 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: not scanned X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from cpc1-cmbg13-0-0-cust596.cmbg.cable.ntl.com ([86.9.122.85]:54306 helo=Victoria.local) by ppsw-32.csi.cam.ac.uk (smtp.hermes.cam.ac.uk [131.111.8.158]:587) with esmtpsa (PLAIN:sl392) (TLSv1:DHE-RSA-AES128-SHA:128) id 1Oei6c-0007cV-0E (Exim 4.72) for bug-gnu-emacs@gnu.org (return-path ); Fri, 30 Jul 2010 06:26:02 +0100 From: Leo Date: Fri, 30 Jul 2010 06:26:00 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Spam-Score: -6.3 (------) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.3 (------) When flyspell-prog-mode is turned on a TeX buffer, anything that has a trailing % will be checked, for example bookmarksnumbered% This is incorrect as the word is neither doc string nor comment. I run into this bug fairly often in LaTeX class and style files. Leo From unknown Sat Sep 06 00:11:09 2025 X-Loop: help-debbugs@gnu.org Subject: bug#6761: 23.2; flyspell-prog-mode in TeX mode Resent-From: Agustin Martin Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 12 Nov 2010 16:55:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6761 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Leo , 6761@debbugs.gnu.org Received: via spool by 6761-submit@debbugs.gnu.org id=B6761.128958086827753 (code B ref 6761); Fri, 12 Nov 2010 16:55:02 +0000 Received: (at 6761) by debbugs.gnu.org; 12 Nov 2010 16:54:28 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PGwtQ-0007Da-Ke for submit@debbugs.gnu.org; Fri, 12 Nov 2010 11:54:28 -0500 Received: from edison.ccupm.upm.es ([138.100.198.71] helo=smtp.upm.es) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PGwtO-0007DV-GV for 6761@debbugs.gnu.org; Fri, 12 Nov 2010 11:54:27 -0500 Received: from agmartin.aq.upm.es (Agmartin.aq.upm.es [138.100.41.131]) by smtp.upm.es (8.14.3/8.14.3/edison-001) with ESMTP id oACGxEw2021384; Fri, 12 Nov 2010 17:59:14 +0100 Received: by agmartin.aq.upm.es (Postfix, from userid 1000) id 7233E598D1; Fri, 12 Nov 2010 17:59:14 +0100 (CET) Date: Fri, 12 Nov 2010 17:59:14 +0100 From: Agustin Martin Message-ID: <20101112165914.GA8167@agmartin.aq.upm.es> References: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="wac7ysb48OaltWcw" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) X-Spam-Score: -6.4 (------) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.4 (------) --wac7ysb48OaltWcw Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Fri, Jul 30, 2010 at 06:26:00AM +0100, Leo wrote: > When flyspell-prog-mode is turned on a TeX buffer, anything that has a > trailing % will be checked, for example > > bookmarksnumbered% > > This is incorrect as the word is neither doc string nor comment. I run > into this bug fairly often in LaTeX class and style files. I finally had time to look at this and seems I found the problem. flyspell-prog-mode just checks that face is not one of the faces selected as text faces, but does that in the char right after the word, so in auto% checks face in the % char getting font-lock-comment-face instead of nil as should be for a not-to-be-checked word. I am playing with attached patch that tries to make sure that check is done in the final character of the word, not in the next char outside it. Will test a bit more and commit if no problems are found. Thanks for your feedback, -- Agustin --wac7ysb48OaltWcw Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="flyspell-prog-mode.0.diff" --- flyspell.el.orig 2010-10-20 13:56:38.000000000 +0200 +++ flyspell.el 2010-11-12 17:15:52.000000000 +0100 @@ -1063,7 +1063,9 @@ start end poss word ispell-filter) (if (or (eq flyspell-word nil) (and (fboundp flyspell-generic-check-word-predicate) - (not (funcall flyspell-generic-check-word-predicate)))) + (save-excursion + (goto-char (- (nth 2 flyspell-word) 1)) + (not (funcall flyspell-generic-check-word-predicate))))) t (progn ;; destructure return flyspell-word info list. --wac7ysb48OaltWcw-- From unknown Sat Sep 06 00:11:09 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.427 (Entity 5.427) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Leo Subject: bug#6761: closed (Re: bug#6761: 23.2; flyspell-prog-mode in TeX mode) Message-ID: References: <20101115132806.GA10578@agmartin.aq.upm.es> X-Gnu-PR-Message: they-closed 6761 X-Gnu-PR-Package: emacs Reply-To: 6761@debbugs.gnu.org Date: Mon, 15 Nov 2010 13:24:01 +0000 Content-Type: multipart/mixed; boundary="----------=_1289827441-30788-1" This is a multi-part message in MIME format... ------------=_1289827441-30788-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #6761: 23.2; flyspell-prog-mode in TeX mode which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 6761@debbugs.gnu.org. --=20 6761: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D6761 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1289827441-30788-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 6761-done) by debbugs.gnu.org; 15 Nov 2010 13:23:15 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PHz1e-00080L-AC for submit@debbugs.gnu.org; Mon, 15 Nov 2010 08:23:14 -0500 Received: from edison.ccupm.upm.es ([138.100.198.71] helo=smtp.upm.es) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PHz1c-00080E-0I for 6761-done@debbugs.gnu.org; Mon, 15 Nov 2010 08:23:12 -0500 Received: from agmartin.aq.upm.es (Agmartin.aq.upm.es [138.100.41.131]) by smtp.upm.es (8.14.3/8.14.3/edison-001) with ESMTP id oAFDS7o9010431; Mon, 15 Nov 2010 14:28:07 +0100 Received: by agmartin.aq.upm.es (Postfix, from userid 1000) id D1BA446373; Mon, 15 Nov 2010 14:28:06 +0100 (CET) Date: Mon, 15 Nov 2010 14:28:06 +0100 From: Agustin Martin To: Leo , 6761-done@debbugs.gnu.org Subject: Re: bug#6761: 23.2; flyspell-prog-mode in TeX mode Message-ID: <20101115132806.GA10578@agmartin.aq.upm.es> References: <20101112165914.GA8167@agmartin.aq.upm.es> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20101112165914.GA8167@agmartin.aq.upm.es> User-Agent: Mutt/1.5.20 (2009-06-14) X-Spam-Score: -6.4 (------) X-Debbugs-Envelope-To: 6761-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.4 (------) On Fri, Nov 12, 2010 at 05:59:14PM +0100, Agustin Martin wrote: > On Fri, Jul 30, 2010 at 06:26:00AM +0100, Leo wrote: > > When flyspell-prog-mode is turned on a TeX buffer, anything that has a > > trailing % will be checked, for example > > > > bookmarksnumbered% > > > > This is incorrect as the word is neither doc string nor comment. I run > > into this bug fairly often in LaTeX class and style files. > > I finally had time to look at this and seems I found the problem. > flyspell-prog-mode just checks that face is not one of the faces selected as > text faces, but does that in the char right after the word, so in > > auto% > > checks face in the % char getting font-lock-comment-face instead of nil as > should be for a not-to-be-checked word. Committed a change that should fix this, so closing this bug report. Just made sure that (flyspell-prog-mode) checks inside the word. -- Agustin ------------=_1289827441-30788-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 30 Jul 2010 05:25:55 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Oei6U-0002YT-AH for submit@debbugs.gnu.org; Fri, 30 Jul 2010 01:25:54 -0400 Received: from mx10.gnu.org ([199.232.76.166]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Oei6S-0002YO-4W for submit@debbugs.gnu.org; Fri, 30 Jul 2010 01:25:52 -0400 Received: from lists.gnu.org ([199.232.76.165]:53001) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Oei6g-0001xl-UO for submit@debbugs.gnu.org; Fri, 30 Jul 2010 01:26:07 -0400 Received: from [140.186.70.92] (port=46484 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Oei6f-00081L-FB for bug-gnu-emacs@gnu.org; Fri, 30 Jul 2010 01:26:06 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_MED,T_RP_MATCHES_RCVD,T_TO_NO_BRKTS_FREEMAIL autolearn=unavailable version=3.3.1 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Oei6e-0007dL-Ar for bug-gnu-emacs@gnu.org; Fri, 30 Jul 2010 01:26:05 -0400 Received: from ppsw-32.csi.cam.ac.uk ([131.111.8.132]:58338) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Oei6e-0007dD-4c for bug-gnu-emacs@gnu.org; Fri, 30 Jul 2010 01:26:04 -0400 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: not scanned X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from cpc1-cmbg13-0-0-cust596.cmbg.cable.ntl.com ([86.9.122.85]:54306 helo=Victoria.local) by ppsw-32.csi.cam.ac.uk (smtp.hermes.cam.ac.uk [131.111.8.158]:587) with esmtpsa (PLAIN:sl392) (TLSv1:DHE-RSA-AES128-SHA:128) id 1Oei6c-0007cV-0E (Exim 4.72) for bug-gnu-emacs@gnu.org (return-path ); Fri, 30 Jul 2010 06:26:02 +0100 From: Leo To: bug-gnu-emacs@gnu.org Subject: 23.2; flyspell-prog-mode in TeX mode Date: Fri, 30 Jul 2010 06:26:00 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Spam-Score: -6.3 (------) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.3 (------) When flyspell-prog-mode is turned on a TeX buffer, anything that has a trailing % will be checked, for example bookmarksnumbered% This is incorrect as the word is neither doc string nor comment. I run into this bug fairly often in LaTeX class and style files. Leo ------------=_1289827441-30788-1--