From debbugs-submit-bounces@debbugs.gnu.org Fri Jul 30 01:25:54 2010 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 From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 12 11:54:28 2010 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 To: Leo , 6761@debbugs.gnu.org Subject: Re: bug#6761: 23.2; flyspell-prog-mode in TeX mode 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-Debbugs-Envelope-To: 6761 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 debbugs-submit-bounces@debbugs.gnu.org Mon Nov 15 08:23:15 2010 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 From unknown Sat Sep 06 00:11:15 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 14 Dec 2010 12:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator