From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: font-lock-extend-region-function: Final refinements. Date: Mon, 07 Aug 2006 13:45:02 -0400 Message-ID: References: <20060803163040.GC1282@muc.de> <20060804085536.GA1107@muc.de> <20060806134849.GA1245@muc.de> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1154972719 13792 80.91.229.2 (7 Aug 2006 17:45:19 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 7 Aug 2006 17:45:19 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Aug 07 19:45:17 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GA9AB-0004td-SS for ged-emacs-devel@m.gmane.org; Mon, 07 Aug 2006 19:45:16 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GA9AB-0006Ki-8q for ged-emacs-devel@m.gmane.org; Mon, 07 Aug 2006 13:45:15 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GA9A1-0006Jn-K9 for emacs-devel@gnu.org; Mon, 07 Aug 2006 13:45:05 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GA99z-0006Ia-Q3 for emacs-devel@gnu.org; Mon, 07 Aug 2006 13:45:05 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GA99z-0006IK-LP for emacs-devel@gnu.org; Mon, 07 Aug 2006 13:45:03 -0400 Original-Received: from [209.226.175.110] (helo=tomts43-srv.bellnexxia.net) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GA9EH-0004Ez-4c for emacs-devel@gnu.org; Mon, 07 Aug 2006 13:49:29 -0400 Original-Received: from localhost ([70.53.194.184]) by tomts43-srv.bellnexxia.net (InterMail vM.5.01.06.13 201-253-122-130-113-20050324) with ESMTP id <20060807174502.GAFR19825.tomts43-srv.bellnexxia.net@localhost>; Mon, 7 Aug 2006 13:45:02 -0400 Original-Received: by localhost (Postfix, from userid 20848) id 378488287; Mon, 7 Aug 2006 13:45:02 -0400 (EDT) Original-To: Alan Mackenzie In-Reply-To: <20060806134849.GA1245@muc.de> (Alan Mackenzie's message of "Sun, 6 Aug 2006 14:48:49 +0100") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:58162 Archived-At: > 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