[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Font-lock decides function call is function declaration in C+ +
From: |
Alan Mackenzie |
Subject: |
Re: Font-lock decides function call is function declaration in C+ + |
Date: |
12 Feb 2007 18:59:19 +0100 |
Date: |
Mon, 12 Feb 2007 19:13:54 +0000 |
User-agent: |
Mutt/1.5.9i |
Hi, Chong and Stefan!
On Sun, Feb 11, 2007 at 06:18:34PM -0500, Chong Yidong wrote:
> Alan Mackenzie <address@hidden> writes:
> > Once a variable has been inserted into c-found-types, it will stay
> > there almost for ever; it will stay there until re-fontification is
> > done from BOB (I'm not sure whether or not that also means
> > (point-min) on a narrowed buffer). This permanence seems to be the
> > fundamental problem.
> > I think a solution might be to remove "foo" from c-found-types
> > whenever text is inserted/deleted in the vicinity of "foo\n bar ();"
> > which syntactically destroys its status as a type identifier. I'll
> > need to think a lot more about this.
> For the Emacs 22 release, if no simple fix is forthcoming, could we
> simply get font-lock to avoid higlighting constructor functions?
Give me a few more days, please!
int main () {
foo( <=================
bar();
}
I think I can now see how to do this removal of "foo" from c-found-types:
After experimenting with C++ Mode, I conjecture that each "critical" use
of "foo" is marked with one of the values (c-decl-id-start
c-decl-type-start) for the property c-type. (Hint: it's not at the
buffer position you might expect.)
If this proves true, or almost true, it will be easy enough to amend CC
Mode's before/after-change function to remove these identifiers from
c-found-types.
Give me a few more days to try this out, please!
--
Alan Mackenzie (Ittersbach, Germany).
- Re: Font-lock decides function call is function declaration in C+ +, Chong Yidong, 2007/02/02
- RE: Font-lock decides function call is function declaration in C+ +, Marshall, Simon, 2007/02/05
- Re: Font-lock decides function call is function declaration in C+ +, Chong Yidong, 2007/02/05
- Re: Font-lock decides function call is function declaration in C+ +, Alan Mackenzie, 2007/02/07
- Re: Font-lock decides function call is function declaration in C+ +, Chong Yidong, 2007/02/09
- Re: Font-lock decides function call is function declaration in C+ +, Alan Mackenzie, 2007/02/11
- Re: Font-lock decides function call is function declaration in C+ +, Stefan Monnier, 2007/02/11
- Re: Font-lock decides function call is function declaration in C+ +, Chong Yidong, 2007/02/11
- Re: Font-lock decides function call is function declaration in C+ +, Stefan Monnier, 2007/02/11
- Re: Font-lock decides function call is function declaration in C+ +,
Alan Mackenzie <=
Re: Font-lock decides function call is function declaration in C+ + - embryonic solution., Alan Mackenzie, 2007/02/22
RE: Font-lock decides function call is function declaration in C+ +, Marshall, Simon, 2007/02/09
Re: Font-lock decides function call is function declaration in C+ +, Chong Yidong, 2007/02/11
RE: Font-lock decides function call is function declaration in C+ +, Marshall, Simon, 2007/02/12