emacs-pretest-bug
[Top][All Lists]
Advanced

[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: 6 Apr 2007 23:47:08 +0200
Date: Sat, 7 Apr 2007 00:06:17 +0100
User-agent: Mutt/1.5.9i

Hi, everybody!

I've just committed a fix (cc-engine.el, cc-fonts.el) to savannah.  I
hope that it fixes the problem.  Certainly, labels now get fontified as
labels, and keywords (e.g. case:, private:, default:, and also QT's
macros, slots:, signals:) get fontified as keywords.

I wasn't able to reproduce the exact problem reported, in particular I
couldn't find any dependency on jit-lock (but my Emacs hadn't been
updated for some while).  I hope nevertherless to have fixed the bug.

Please let me know whether there are still problems.

-- 
Alan Mackenzie (Ittersbach, Germany).



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?

> Simon.

> > -----Original Message-----
> > From: Chong Yidong [mailto:address@hidden On Behalf Of Chong Yidong
> > Sent: 30 March 2007 04:23
> > To: Simon Marshall; Feng Li
> > Cc: address@hidden
> > Subject: Re: CC Mode, labels not fontified

> > address@hidden (Johan Bockgård) writes:

> > > $ emacs -Q +2956 .../emacs/src/eval.c

> > > The `retry:' label is not highlighted. It is fontified correctly by 
> > > `M-o M-o' though.

> > Simon, this appears to be the result of your change.  Could 
> > you try to fix your patch?

> > 2006-11-10  Simon Marshall  <address@hidden>

> >     * progmodes/cc-fonts.el (c-font-lock-declarations): Don't overwrite
> >     fontification for "case" and "default" keywords.

> > *** emacs/lisp/progmodes/cc-fonts.el        2006/07/10 13:17:09     1.16
> > --- emacs/lisp/progmodes/cc-fonts.el        2006/11/10 16:58:27     1.17




reply via email to

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