[Top][All Lists]

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

Re: Last steps for pretesting (font-lock-extend-region-function)

From: Stefan Monnier
Subject: Re: Last steps for pretesting (font-lock-extend-region-function)
Date: Tue, 25 Apr 2006 15:26:46 -0400
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

>>> I was talking about programmer work, and I've shown you the code for
>>> font-lock-multiline: it's quite a bit shorter and more straightforward than
>>> your hack using b-c-f and a-c-f: just match the multiline element, place
>>> a font-lock-multiline property on it, and you're set.

>> Do you even have to bother with placing font-lock-multiline properties
>> manually?  In AUCTeX we simply set the font-lock-multiline variable to
>> t and font-lock added the property automatically.

> Yes, absolutely!  There are two separate things here which Stefan is
> failing to distinguish:

> (i) The matching of keywords which span line breaks;

This can only reliably be handled by a hook in

> (ii) Extending a font-lock region to include all text needing
> refontification.

> If I've understood font-lock-multiline properly, only manually setting
> f-l-m can achieve purpose (ii).

No, setting the font-lock-multiline variable will (if all goes well) take
care of (ii), but won't reliably take care of (i).

Setting the font-lock-multiline property by hand will take care of (ii) but
not of (i).


reply via email to

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