[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: font-lock-extend-region-function: Final refinements.
From: |
Stefan Monnier |
Subject: |
Re: font-lock-extend-region-function: Final refinements. |
Date: |
Mon, 07 Aug 2006 13:45:02 -0400 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) |
> What do you mean by "client packages" here. Is this things like
> glasses.el?
Yes, and font-lock.el
> Does it include font-lock.el,
Yes. Any package which uses jit-lock-register, basically.
> does it include foo-mode.el?
If you mean a major mode "Foo", then no: major modes typically don't use
jit-lock: they use font-lock (which may or may not internally use jit-lock,
but that's mostly none of their business, unless they fiddle with
font-lock-support-mode).
> Are you saying that j-l-a-c-extend-region-f is a hook purely for the use
> of font-lock itself (i.e. only in the three files font-lock.el,
> font-core.el and jit-lock.el)?
And glasses.el, yes.
> I'm fairly confused at the moment, particularly by some of the function
> names. For example, what does the "jit-lock" part of the name
> `font-lock-extend-jit-lock-region-after-change' mean? Does it mean that
> this function only gets called when jit-lock is active?
Yes.
> Could you possibly give these new functions doc strings (or even comments)
> which explain the context in which they're called?
It's on the way.
> But I'm not sure you've answered my question; if you have, I've not
> understood the answer. So let me ask it again: why are there two
> separate hooks for extending the region after a buffer change [that's
> jit-lock-after-change-region-functions and
> font-lock-extend-after-change-region-function]?
Because you can use jit-lock without font-lock and vice-versa. One is for
jit-lock clients (e.g. font-lock), and the other for font-lock clients
(e.g. c-mode).
> Again, would it be possible to simplify the whole mechanism by using
> only one of the pairs `font-lock-beg/end' and `jit-lock-start/end'?
Why would you care?
c-mode should never need to know about jit-lock-(beg|end).
Stefan