From: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org
Subject: Re: font-lock-extend-region-function: Final refinements.
Date: Mon, 07 Aug 2006 13:45:02 -0400 [thread overview]
Message-ID: <jwvu04ola7y.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <20060806134849.GA1245@muc.de> (Alan Mackenzie's message of "Sun, 6 Aug 2006 14:48:49 +0100")
> 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
next prev parent reply other threads:[~2006-08-07 17:45 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-30 12:48 font-lock-extend-region-function: Final refinements Alan Mackenzie
2006-04-30 14:55 ` Stefan Monnier
2006-04-30 20:54 ` Richard Stallman
[not found] ` <jwv8xm6p9jx.fsf-monnier+emacs@gnu.org>
[not found] ` <20060803163040.GC1282@muc.de>
[not found] ` <jwvirl9llf2.fsf-monnier+emacs@gnu.org>
2006-08-04 8:55 ` Alan Mackenzie
2006-08-04 14:59 ` Stefan Monnier
2006-08-06 13:48 ` Alan Mackenzie
2006-08-07 17:45 ` Stefan Monnier [this message]
2006-08-07 22:49 ` Alan Mackenzie
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jwvu04ola7y.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.