[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: CC Mode, labels not fontified
From: |
Alan Mackenzie |
Subject: |
Re: CC Mode, labels not fontified |
Date: |
1 Apr 2007 22:23:12 +0200 |
Date: |
Sun, 1 Apr 2007 22:41:58 +0100 |
User-agent: |
Mutt/1.5.9i |
Hi, Simon, Chong!
I've got this problem nailed, I think.
On Fri, Mar 30, 2007 at 10:17:54AM +0100, Marshall, Simon wrote:
> To give context, the change was to stop this overwriting-mis-fontification:
> case foo:
> ^^^ not fontified (generally used to be fontified as a
> label/constant)
> ^^^^ fontified as a label/constant (used to be fontified as a keyword)
> With the change, "case" remains fontified as a keyword.
> Superficially, it would seem my change would prevent goto labels from being
> fontified. That might be true, given my lack of understanding of the new
> cc-mode fontification engine. However, it looks like it might be some
> interaction with jit-lock mode, since if font-lock-support-mode is nil, then
> fontification is OK. (This is presumably why M-o M-o also fontifies
> correctly.)
> So I'm tempted to say it's not (simply) due to my change. Stefan, Alan, any
> pointers?
[From the original poster.]
> > > The `retry:' label is not highlighted. It is fontified correctly by
> > > `M-o M-o' though.
I'm not sure I believe this. I can't reproduce it.
I'm coding up a fix at the moment. The idea is to get `c-forward-label'
to indicate in its return code what sort of "label" it's moved over.
"label" here means just about anything with a colon in it apart from a
bitfield specifier in a struct (something like int foo : 2, meaning foo
is -2 .. 1). It can also be things like "@private" in Objective-C.
`c-font-lock-declarations' will then only fontify a goto-label or a
case-label.
Give me a day or two!
> Simon.
--
Alan.
- Re: CC Mode, labels not fontified,
Alan Mackenzie <=
- RE: CC Mode, labels not fontified, Marshall, Simon, 2007/04/02
- Re: CC Mode, labels not fontified, Alan Mackenzie, 2007/04/06
- RE: CC Mode, labels not fontified, Marshall, Simon, 2007/04/10