all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Alan Mackenzie <acm@muc.de>
To: Francesco Potorti` <pot@gnu.org>
Cc: alinsoar@voila.fr, "Emacs   Dev  \[emacs-devel\]" <emacs-devel@gnu.org>
Subject: Re: C font-lock bug
Date: 27 Apr 2007 14:38:24 +0200	[thread overview]
Message-ID: <20070427135917.GB3613@muc.de> (raw)
In-Reply-To: <E1HhNMU-0004js-PN@tucano.isti.cnr.it>

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	other threads:[~2007-04-27 12:38 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-27 11:05 [alinsoar@voila.fr: this is a bug?] A Soare
2007-04-27 10:07 ` C font-lock bug Francesco Potorti`
2007-04-27 12:38   ` Alan Mackenzie [this message]
  -- strict thread matches above, loose matches on Subject: below --
2007-04-27 10:32 A Soare
2007-04-27 11:19 ` Francesco Potorti`
2007-04-27 11:30 A Soare
2007-04-27 17:56 A Soare

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070427135917.GB3613@muc.de \
    --to=acm@muc.de \
    --cc=alinsoar@voila.fr \
    --cc=emacs-devel@gnu.org \
    --cc=pot@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.