[Top][All Lists]

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

Re: [Emacs-diffs] emacs-24 d69e9f1: CC Mode: Stop Font Lock forcing font

From: Stefan Monnier
Subject: Re: [Emacs-diffs] emacs-24 d69e9f1: CC Mode: Stop Font Lock forcing fontification from BOL. Fixes debbugs#19669.
Date: Thu, 19 Mar 2015 09:49:13 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

> The problem in #19669 was that Font Lock's extension of the region to be
> font locked to the beginning of the line was changing the syntactic
> context, hence CC Mode's font locking didn't work in that case.  The
> solution was to prevent that extension in the pertinent case.  However, I
> got it wrong.

The way I see it, the core of the problem is that the way you handle
partial re-fontification of a multi-line `union' construct has
a dead spot.

More specifically, if you have code like

1    union
2      {
3        foo,
4        bar
5      }

you can handle fontification from 1,3, or 4 but not from 2.  You need to
refine the system you use to keep track of whether we're within
a `union' so that it knows that position 2 is also "within a union".


reply via email to

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