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 21:02:39 +0200

* Alan Mackenzie (2006-04-24) writes:

> after-change-functions is the canonical way of solving problems related
> to buffer changes.  This includes Font Locking.

But extending the region in the after-change case does not help with
"normal" fontification by region as e.g. done by jit-lock.

> I say to you again - your solution is not robust.  I don't think it's
> been tried at all (correct me if I'm wrong).

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.

> We are both aware of a refinement
> which is needed, namely calling some sort of f-l-extend-region-f from
> f-l-d-f-r and j-l-f-n.

If putting the hook into `font-lock-default-fontify-region' works
reliably, why do you need it in `after-change-functions' and
`jit-lock-fontify-now' as well?

-- 
Ralf





reply via email to

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