From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jan =?UTF-8?Q?Dj=C3=A4rv?= Newsgroups: gmane.emacs.bugs Subject: bug#5422: syntax highlighting bug Date: Tue, 4 Oct 2011 07:32:57 +0200 Message-ID: <9AFE9713-A3D7-49B9-BF21-920F91C067EF@swipnet.se> References: <201001191321.30279.blew@astro.uni.torun.pl> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (iPhone Mail 8L1) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1317706440 5663 80.91.229.12 (4 Oct 2011 05:34:00 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 4 Oct 2011 05:34:00 +0000 (UTC) Cc: "blew@astro.uni.torun.pl" , "5422@debbugs.gnu.org" <5422@debbugs.gnu.org> To: Glenn Morris Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Oct 04 07:33:52 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RAxdY-0003Hg-0C for geb-bug-gnu-emacs@m.gmane.org; Tue, 04 Oct 2011 07:33:52 +0200 Original-Received: from localhost ([::1]:55156 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RAxdX-00070i-5q for geb-bug-gnu-emacs@m.gmane.org; Tue, 04 Oct 2011 01:33:51 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:37863) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RAxdR-0006yD-O8 for bug-gnu-emacs@gnu.org; Tue, 04 Oct 2011 01:33:47 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RAxdK-00057m-Sa for bug-gnu-emacs@gnu.org; Tue, 04 Oct 2011 01:33:44 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:38416) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RAxdH-00055J-Ft; Tue, 04 Oct 2011 01:33:35 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1RAxef-0002tp-Lk; Tue, 04 Oct 2011 01:35:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Jan =?UTF-8?Q?Dj=C3=A4rv?= Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org, bug-cc-mode@gnu.org Resent-Date: Tue, 04 Oct 2011 05:35:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 5422 X-GNU-PR-Package: emacs,cc-mode X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 5422-submit@debbugs.gnu.org id=B5422.131770648511122 (code B ref 5422); Tue, 04 Oct 2011 05:35:01 +0000 Original-Received: (at 5422) by debbugs.gnu.org; 4 Oct 2011 05:34:45 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RAxeO-0002tL-IE for submit@debbugs.gnu.org; Tue, 04 Oct 2011 01:34:45 -0400 Original-Received: from smtprelay-b22.telenor.se ([195.54.99.213]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RAxeL-0002tC-VX for 5422@debbugs.gnu.org; Tue, 04 Oct 2011 01:34:43 -0400 Original-Received: from iph1.telenor.se (iph1.telenor.se [195.54.127.132]) by smtprelay-b22.telenor.se (Postfix) with ESMTP id 2CE59EADBE for <5422@debbugs.gnu.org>; Tue, 4 Oct 2011 07:33:11 +0200 (CEST) X-SENDER-IP: [85.225.45.201] X-LISTENER: [smtp.bredband.net] X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ArM1AGyaik5V4S3JPGdsb2JhbABCpxZrGQEBAQE3MoFTAQEEAScTHCMFCwsOCi4tDAoUBhOHewIEuAeGQGEEmQaMHQ X-IronPort-AV: E=Sophos;i="4.68,483,1312149600"; d="scan'208";a="489468352" Original-Received: from c-c92de155.25-1-64736c10.cust.bredbandsbolaget.se (HELO coolsville.localdomain) ([85.225.45.201]) by iph1.telenor.se with ESMTP; 04 Oct 2011 07:33:01 +0200 Original-Received: from [172.20.199.248] (janiphone [172.20.199.248]) by coolsville.localdomain (Postfix) with ESMTPSA id 554B17FA058; Tue, 4 Oct 2011 07:33:01 +0200 (CEST) In-Reply-To: X-Mailer: iPhone Mail (8L1) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Tue, 04 Oct 2011 01:35:01 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 1) 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:52144 Archived-At: Hello. 3 okt 2011 kl. 22:59 skrev Glenn Morris : > Bartosz Lew wrote: >=20 >> This is just to report on some minor C++ syntax highlighting problem >> in emacs. >>=20 >> when I write: >>=20 >> if (a < b->c()) { do this; } else { do that; } >>=20 >> two two things go wrong: >> 1) parentheses matching doesn't work correctly=20 >> emacs matches the closing bracket of the if condition with the >> "<" - "smaller > than" sign in the if condition. >>=20 >> 2) the automatic positioning of any code written below gets confused due t= o=20 >> this parentheses matching problem. >>=20 >> I use: >>=20 >> GNU Emacs 23.1.1 (i386-redhat-linux-gnu, GTK+ Version 2.16.6) >> of 2009-09-29 on x86-7.fedora.phx.redhat.com >=20 > I am unable to reproduce this in any version of Emacs, including 23.1. > If you still see the problem in the latest release, please send a > complete example starting from emacs -Q. >=20 > (There seem to have been some fixes in this area, eg > http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D4847 ) >=20 This is one of the elusive cc-mode bugs that isn't easy to reproduce.=20 AFAIK it depends on some cache in cc-mode getting out of sync. So you are mo= re likely to see it on a large file you have edited in several places. It mi= ght even depend on what kind of editing you have done. I think this is a sym= ptom of some underlying bug. I see this in 23.3 and the trunk at least 2-3 times per day when editing cod= e with a lot of templates. The < and > are mistaken for start/end brace or p= arentesis. Save the file, kill the buffer, and reopen the file usually fixes it. Jan D.=