emacs-devel
[Top][All Lists]
Advanced

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

Re: C font-lock bug


From: Alan Mackenzie
Subject: Re: C font-lock bug
Date: 27 Apr 2007 14:38:24 +0200
Date: Fri, 27 Apr 2007 14:59:17 +0100
User-agent: Mutt/1.5.9i

Hi, Francesco!

On Fri, Apr 27, 2007 at 12:07:34PM +0200, Francesco Potorti` wrote:
> Sorry for the big delay, I am trying ot recover my email backlog.

> >> >1. Emacs -Q
> >> >2. M-. Lisp_Type <RET
> >> >Select then the path to your TAGS file of your emacs.  The first 4
> >> >members of this enumeration are listed in yellow color to me . The
> >> >last 4 members in black color .

[ .... ]

> At last I understand.  In fact, find-tag is completely unrelated with
> this.  I changed the subject to reflect that this is a bug in font-lock
> for C code.

OK.

> Specifically, if you load lisp.h from the Emacs sources and look at
> enum Lisp_Type you see that the colour of the members of the enum
> changes after the fourth member.

Yes.  A workaround is M-o M-o.  (Yes, I _know_ you know this.  Sorry!)

This problem has been around a long time, and needs substantial work to
fix.  It happens in long enums, structs, and so on.  The font-locking
code needs to be told where to start its parsing, and after the first few
lines in a long enum, the font-locking stuff no longer knows that it's
inside an enum because the start of the enum is "too far away".

In a solution, the CC Mode font locking routines will have to determine
the place to start and stop parsing, and have to communicate this to the
Font Lock code somehow.  There have been extensive discussions on
emacs-devel about these topics.

This isn't going to get fixed for Emacs 22.  Sorry!

-- 
Alan Mackenzie (Ittersbach, Germany).




reply via email to

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