[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 16:56:16 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

>> 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".

> Well, sort of.  The problem I'm facing is that in Dima Kogan's bug
> #19669, the following construct appears:

> 1. enum xxx_xxxx_xxxxxxxxxx_x

> Note that the brace on L2 is on the same line as the first XXX_....

> When the user types on line 4, 5, ... here, CC Mode sets the
> fontification region start to JUST AFTER THE { ON L2.  It is essential
> that Font Lock doesn't change this.

There's your problem: your current setup needs the starting point to be
either before "union" or after the first open brace.
It breaks down if it's between the two.  That's the problem you need to fix.


reply via email to

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