[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Font-lock decides function call is function declaration in C+ + - Pa
Re: Font-lock decides function call is function declaration in C+ + - Patch
10 Mar 2007 00:23:31 +0100
Sat, 10 Mar 2007 00:40:16 +0000
On Fri, Mar 09, 2007 at 04:25:35PM -0500, Richard Stallman wrote:
> It's a fairly scrappy ad-hoc patch - it fixes a particular simple bug
> scenario which will surely occur frequently.
> What I worry about is, how likely is it to cause new bugs in other
I was worrying about that all the time I was formulating the bug and
writing the patch. The answer is, IMBO[*], not very likely. Here's my
(i) The patch doesn't change the buffer contents (apart from, possibly,
text properties on some characters). It intended effect is purely to
remove type-identifiers from the cache `c-found-types'. Removing a type
from this cache when it should stay there wouldn't be that bad. Failing
to remove a stale type would be no worse than the code prior to the fix.
(ii) Bugs like going off the end of a buffer, getting lisp errors with
empty buffers, and such like, are possible.
(iii) Bugs like forgetting to widen are possible.
[*] "In my biassed opion"
> It would be safer just to turn off this cache feature.
That would throw out some of the fontification, and would slow things
down. I don't know by how much; I would guess quite a lot.
> How much would users mind that?
I would guess some (like Simon ;-) would mind a lot. Others (like me)
would hardly notice. I think, in general, it wouldn't be good to take
this cache out, now. It's been in place since CC Mode 5.30 (summer
How about letting Simon test it on his C++ code?
Alan Mackenzie (Ittersbach, Germany).