[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: Ralf Angeli
Subject: Re: Last steps for pretesting (font-lock-extend-region-function)
Date: Tue, 25 Apr 2006 22:12:28 +0200

* Stefan Monnier (2006-04-25) writes:

>> 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.
> Thanks for pointing it out,

Now I feel a bit guilty that I didn't mention this earlier.  Anyway, I
thought that a hook in f-l-d-f-r might be useful despite the
possibility mentioned above as a "documentable" and common way of
extending the region.  But you are right, it's not really necessary.
But then, IMO, a hook in `after-change-functions' is not strictly
necessary either.  Its only benefit might be that refontification of
the extended region happens faster.


reply via email to

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