From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chong Yidong Newsgroups: gmane.emacs.devel Subject: Re: Font-lock decides function call is function declaration in C+ + Date: Thu, 01 Feb 2007 23:04:48 -0500 Message-ID: <87k5z1yzkv.fsf@stupidchicken.com> References: <81CCA6588E60BB42BE68BD029ED48260105584F1@wimex2.wim.midas-kapiti.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1171214619 14541 80.91.229.12 (11 Feb 2007 17:23:39 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 11 Feb 2007 17:23:39 +0000 (UTC) Cc: emacs-devel@gnu.org To: "Marshall\, Simon" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Feb 11 18:23:31 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1HGIQE-0007DI-HT for ged-emacs-devel@m.gmane.org; Sun, 11 Feb 2007 18:23:30 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HGIQD-0004s4-Va for ged-emacs-devel@m.gmane.org; Sun, 11 Feb 2007 12:23:29 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HGIQ2-0004ri-Nd for emacs-devel@gnu.org; Sun, 11 Feb 2007 12:23:18 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HGIQ1-0004rZ-Cz for emacs-devel@gnu.org; Sun, 11 Feb 2007 12:23:17 -0500 Original-Received: from south-station-annex.mit.edu ([18.72.1.2]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1HGIQ1-0002d0-25 for emacs-devel@gnu.org; Sun, 11 Feb 2007 12:23:17 -0500 Original-Received: from grand-central-station.mit.edu (GRAND-CENTRAL-STATION.MIT.EDU [18.7.21.82]) by south-station-annex.mit.edu (8.13.6/8.9.2) with ESMTP id l1BHNFRB012375; Sun, 11 Feb 2007 12:23:15 -0500 (EST) Original-Received: from outgoing-legacy.mit.edu (OUTGOING-LEGACY.MIT.EDU [18.7.22.104]) by grand-central-station.mit.edu (8.13.6/8.9.2) with ESMTP id l1BHN3jE009765; Sun, 11 Feb 2007 12:23:05 -0500 (EST) Original-Received: from localhost (SYDNEYPACIFIC-THREE-SIXTY-THREE.MIT.EDU [18.95.6.108]) ) by outgoing-legacy.mit.edu (8.13.6/8.12.4) with ESMTP id l1BHN2gh023319; Sun, 11 Feb 2007 12:23:02 -0500 (EST) Original-Received: from cyd by localhost with local (Exim 3.36 #1 (Debian)) id 1HCpfR-0000np-00; Thu, 01 Feb 2007 23:04:53 -0500 In-Reply-To: <81CCA6588E60BB42BE68BD029ED48260105584F1@wimex2.wim.midas-kapiti.com> (Simon Marshall's message of "Fri\, 12 Jan 2007 15\:00\:48 -0000") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.93 (gnu/linux) X-Scanned-By: MIMEDefang 2.42 X-Spam-Score: -2.599 X-detected-kernel: Solaris 9.1 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:66265 Archived-At: Does this bug still exist with latest CVS? If so, please provide a simple test case (I couldn't find one in your previous messages). > Hi, this bug remains[*] and a quick look at the C++ file I am editing shows > that most of my methods have ended up with this sort of misfontification > somewhere. Note that misfontification does not occur during initial > fontification, only after editing (though not in a way I can replicate). I > guess sometimes it thinks function calls are part of a declaration, though it > doesn't necessarily happen when the preceding statement is a declaration. In > one occurrence in my C++ file, the misfontification has occurred immediately > after a for loop. > > Again, I'm asking for help. I never got a response last time. What do I need > to look at to see what is going on? > > [*] following my revision 1.18 date: 2006-11-15 16:31:03 fix in cc-fonts.el of > another unrelated issue in CVS Emacs, Emacs CVS fontifies the below with > font-lock-variable-name-face, rather than font-lock-function-name-face, which > may/may not give a pointer to where the problem lies. > > _____________________________________________ > From: Marshall, Simon > Sent: 07 September 2006 17:41 > To: 'bug-cc-mode@gnu.org' > Cc: 'emacs-pretest-bug@gnu.org' > Subject: Font-lock decides function call is function declaration in > C++ > > Intermittently, but for ages, Emacs CVS suddenly decides that C++ lines of > code of the form: > > foo(bar); > > Or: > > foo() = bar; > > Are function declarations, and puts font-lock-function-name-face on (in > these examples) "foo". It seems to happen when I am editing the line in > question, or maybe just on a line near it. (I think the last time it > appeared when I did M-^ on the line following, but I could be wrong. There > is nothing wrong with the code preceding the misfontification.) > > Editing the line or lines above it do not make the fontification > permanently go away. For example, if I comment out all preceding lines, > the fontification is removed. However, when I remove the comments, it > comes back. The only way I've found to get rid of it is to turn > font-lock-mode off and on. > > It's driving me mad because I can't work out what, in terms of the code > preceding it, is causing it to fontify in this way. In one case, the > function call was the first statement in the method, and I noticed that the > text also had the "c-in-sws" property (as well as the "face" property). > Debugging through cc-engine.el doesn't look fun and I don't know if the > presence of this property is a red herring. > > I can't reproduce it, so I'm really asking for help. Any ideas? What can > I do to work out what is going wrong? > > Simon. > > > > This email message is intended for the named recipient only. It may be > privileged and/or confidential. If you are not the named recipient of this > email please notify us immediately and do not copy it or use it for any > purpose, nor disclose its contents to any other person. > > > > Misys Banking Systems is a trading name of Misys International Banking Systems > Limited which is registered in England and Wales under company registration > number 00971479 and with its registered office address at Burleigh House, > Chapel Oak, Salford Priors, Evesham WR11 8SP. > > > > THIS E-MAIL DOES NOT CONSTITUTE THE COMMENCEMENT OF LEGAL RELATIONS BETWEEN YOU > AND MISYS INTERNATIONAL BANKING SYSTEMS LIMITED. PLEASE REFER TO THE EXECUTED > CONTRACT BETWEEN YOU AND THE RELEVANT MEMBER OF THE MISYS GROUP FOR THE > IDENTITY OF THE CONTRACTING PARTY WITH WHICH YOU ARE DEALING. > > _______________________________________________ > emacs-pretest-bug mailing list > emacs-pretest-bug@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug