From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.devel Subject: Re: Is there something like `on-display-functions'? Date: Fri, 29 Jan 2010 19:17:37 +0000 Message-ID: <20100129191737.GE3272@muc.de> References: <20100127153733.GD3432@muc.de> <83k4v34f49.fsf@gnu.org> <83fx5r48gd.fsf@gnu.org> <20100128103856.GC2285@muc.de> <20100129131751.GC3272@muc.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1264792907 9963 80.91.229.12 (29 Jan 2010 19:21:47 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 29 Jan 2010 19:21:47 +0000 (UTC) Cc: Eli Zaretskii , emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jan 29 20:21:44 2010 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1NawPX-0003NP-Nh for ged-emacs-devel@m.gmane.org; Fri, 29 Jan 2010 20:21:44 +0100 Original-Received: from localhost ([127.0.0.1]:53370 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NawPX-0005Jb-2U for ged-emacs-devel@m.gmane.org; Fri, 29 Jan 2010 14:21:43 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NawF7-0005pf-2O for emacs-devel@gnu.org; Fri, 29 Jan 2010 14:10:57 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NawF2-0005mK-3M for emacs-devel@gnu.org; Fri, 29 Jan 2010 14:10:56 -0500 Original-Received: from [199.232.76.173] (port=39997 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NawF1-0005m9-Sq for emacs-devel@gnu.org; Fri, 29 Jan 2010 14:10:51 -0500 Original-Received: from colin.muc.de ([193.149.48.1]:4329 helo=mail.muc.de) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NawF0-0005aV-RP for emacs-devel@gnu.org; Fri, 29 Jan 2010 14:10:51 -0500 Original-Received: (qmail 13520 invoked by uid 3782); 29 Jan 2010 19:10:47 -0000 Original-Received: from acm.muc.de (pD9E226D3.dip.t-dialin.net [217.226.38.211]) by colin2.muc.de (tmda-ofmipd) with ESMTP; Fri, 29 Jan 2010 20:10:45 +0100 Original-Received: (qmail 10157 invoked by uid 1000); 29 Jan 2010 19:17:37 -0000 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.9i X-Delivery-Agent: TMDA/1.1.5 (Fettercairn) X-Primary-Address: acm@muc.de X-detected-operating-system: by monty-python.gnu.org: FreeBSD 4.6-4.9 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:120667 Archived-At: HI, Stefan, On Fri, Jan 29, 2010 at 01:13:42PM -0500, Stefan Monnier wrote: > > jit-lock-register's function only gets called when font lock is > > enabled, > No: jit-lock has nothing to do with font-lock, except for the fact that > font-lock is its main client (and that historically jit-lock was > written only for font-lock), so it's naturally tuned towards serving > font-lock better than other potential clients. Is this nothing-to-do-with-ness documented anywhere? In the elisp manual, jit-lock is found twice, both occurrences in "Other Font Lock Variables". Without reading the source code in great detail, you'd be hard pressed to find out that the jit-lock mechanism is operative when font-lock mode is disabled. > I.e. jit-lock-register's function will be called regardless of whether > font-lock is enabled or not. > > or at least that's what the fine manual says and the doc string > > implies. > The docstring doesn't mention font-lock. It mentions "fontification". Isn't that a synonym for font-lock? Or is it the part of redisplay that converts characters into glyphs and pixels, regardless of whether font-lock is enabled? jit-lock-register says that FUN is "registered as a fontification function". I think Somebody (tm) could usefully separate out jit-lock from font-lock in the doc strings and manual. Just as a matter of interest, how does jit-lock know the END parameter which it passes to FUN? Or is this just a random value, a few hundred bytes after BEG? > Stefan -- Alan Mackenzie (Nuremberg, Germany).