emacs-devel
[Top][All Lists]
Advanced

[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:58:52 +0200

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

>> 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.
>
> I was thinking of documenting this use of font-lock-fontify-region-function
> in the new "multi line font lock elements" node of the elisp manual.
> Do you think a separate hook is still necessary?

If the above mentioned use of f-l-f-r-f will be documented, the need
for a hook diminishes even further.  It would only serve as a more
convenient way of achieving the same thing.  So, no, I don't think the
hook is still necessary.

> The way I see it, a separate hook would only really make sense if it were
> a "normal" hook where you can place several functions, so that minor modes
> can also use it reliably and easily.

Yes.  In AUCTeX I used a regular list, not a hook, for this purpose.

>> 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.
>
> I don't understand what you're saying here.

When experimenting with extension of the region to be fontified in
AUCTeX I advised `jit-lock-after-change' to do this extension and with
that piece of advice refontification of a multiline construct after a
buffer change happened immediately while without the advice it took a
few moments.  Possibly as long as `jit-lock-context-time' IIUC.

-- 
Ralf





reply via email to

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