[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: Alan Mackenzie
Subject: Re: Last steps for pretesting (font-lock-extend-region-function)
Date: Tue, 25 Apr 2006 22:30:17 +0000 (GMT)

Hi, Stefan!

On Tue, 25 Apr 2006, Stefan Monnier wrote:

>> Hopefully I understand "your solution" correctly here if I am assuming
>> this relates to putting the hook into
>> `font-lock-default-fontify-region'.  I've implemented a variant of
>> this approach for AUCTeX by using a custom-made function for
>> `font-lock-fontify-region-function' which calls other functions for
>> extending the region and then calls `font-lock-default-fontify-region'
>> with the extended region as arguments.  There is no special code in
>> `after-change-functions' and the approach actually works quite well.

>Hey, that's a very good point.  There isn't any real need for a new
>"extend-region" hook in font-lock-default-fontify-region since we can
>simply use the font-lock-fontify-region-function hook for that purpose.

Would this not be very inconvenient?  Somebody needing the extend-region
functionality in f-l-d-f-r would then have to copy the entire source of
the default function, amend the source, make the
f-l-fontify-region-funtion buffer local, then set it.

>        Stefan


reply via email to

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