unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* `font-lock-extend-region-functions' vs. `font-lock-extend-after-change-region-function'
@ 2009-04-28 15:34 Tobias C. Rittweiler
  2009-04-28 16:10 ` Stefan Monnier
  2009-05-16 12:26 ` Tobias C. Rittweiler
  0 siblings, 2 replies; 13+ messages in thread
From: Tobias C. Rittweiler @ 2009-04-28 15:34 UTC (permalink / raw)
  To: emacs-devel


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.








^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2009-05-16 12:26 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-28 15:34 `font-lock-extend-region-functions' vs. `font-lock-extend-after-change-region-function' Tobias C. Rittweiler
2009-04-28 16:10 ` Stefan Monnier
2009-04-28 20:45   ` Tobias C. Rittweiler
2009-04-29 10:42   ` Tobias C. Rittweiler
2009-04-29 13:46     ` Stefan Monnier
2009-04-29 17:40       ` Tobias C. Rittweiler
2009-04-29 20:26         ` Stefan Monnier
2009-04-29 20:45           ` Samuel Bronson
2009-04-29 20:53             ` Stefan Monnier
2009-05-01 16:37           ` Tobias C. Rittweiler
2009-05-04 19:08             ` Stefan Monnier
2009-05-07 12:30               ` Tobias C. Rittweiler
2009-05-16 12:26 ` Tobias C. Rittweiler

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).