[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Font-lock decides function call is function declaration in C++

From: Marshall, Simon
Subject: Font-lock decides function call is function declaration in C++
Date: Thu, 7 Sep 2006 17:41:06 +0100

Intermittently, but for ages, Emacs CVS suddenly decides that C++ lines of code of the form:



        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?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]