emacs-devel
[Top][All Lists]
Advanced

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

`font-lock-extend-region-functions' vs. `font-lock-extend-after-change-r


From: Tobias C. Rittweiler
Subject: `font-lock-extend-region-functions' vs. `font-lock-extend-after-change-region-function'
Date: Tue, 28 Apr 2009 17:34:42 +0200
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/23.0.60 (gnu/linux)

Hi,

what is the difference between the variables

  `font-lock-extend-region-functions' 

and 

  `font-lock-extend-after-change-region-function' ?

In particular, how do they relate? Which should be used for what?

>From a major-mode writer's point of view. 


I face the following problem: Font-lock, perhaps just jit-lock (I'm
using that), calls `font-lock-fontify-region-function' with start and
end values pretty much arbitrary in the buffer.

That breaks the following:

I have a MATCHER function on `font-lock-keywords' which on some
occasions has to to match beyond the limit it's called with. In that
case it declines, but that results in font-lock skipping over that
region and going to the next. If it doesn't decline, and returns match
data for the whole thing (beyond the limit), only up to the limit will
in fact be fontified.

What should be done in this case?

I thought about specifying a function for
`font-lock-extend-region-functions' which extends the end to the end of
the current defun.

  -T.








reply via email to

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