From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Is there something like `on-display-functions'? Date: Wed, 27 Jan 2010 22:08:18 +0200 Message-ID: <83fx5r48gd.fsf@gnu.org> References: <20100127135716.GA3432@muc.de> <20100127153733.GD3432@muc.de> <83k4v34f49.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: lo.gmane.org X-Trace: ger.gmane.org 1264622991 16093 80.91.229.12 (27 Jan 2010 20:09:51 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 27 Jan 2010 20:09:51 +0000 (UTC) Cc: acm@muc.de, emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jan 27 21:09: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 1NaECX-0004hf-RJ for ged-emacs-devel@m.gmane.org; Wed, 27 Jan 2010 21:09:22 +0100 Original-Received: from localhost ([127.0.0.1]:38420 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NaECX-0006lL-47 for ged-emacs-devel@m.gmane.org; Wed, 27 Jan 2010 15:09:21 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NaEBZ-0005xR-Is for emacs-devel@gnu.org; Wed, 27 Jan 2010 15:08:21 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NaEBU-0005rf-AK for emacs-devel@gnu.org; Wed, 27 Jan 2010 15:08:20 -0500 Original-Received: from [199.232.76.173] (port=47621 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NaEBU-0005rR-7J for emacs-devel@gnu.org; Wed, 27 Jan 2010 15:08:16 -0500 Original-Received: from mtaout21.012.net.il ([80.179.55.169]:46759) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NaEBT-00035i-Lq for emacs-devel@gnu.org; Wed, 27 Jan 2010 15:08:15 -0500 Original-Received: from conversion-daemon.a-mtaout21.012.net.il by a-mtaout21.012.net.il (HyperSendmail v2007.08) id <0KWX0090096EIE00@a-mtaout21.012.net.il> for emacs-devel@gnu.org; Wed, 27 Jan 2010 22:08:14 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([77.127.180.161]) by a-mtaout21.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0KWX0088N99PWL30@a-mtaout21.012.net.il>; Wed, 27 Jan 2010 22:08:14 +0200 (IST) In-reply-to: X-012-Sender: halo1@inter.net.il X-detected-operating-system: by monty-python.gnu.org: Solaris 10 (beta) 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:120522 Archived-At: > From: Stefan Monnier > Cc: Alan Mackenzie , emacs-devel@gnu.org > Date: Wed, 27 Jan 2010 14:24:18 -0500 > > >> > I'd recommend you use jit-lock instead (via jit-lock-register), tho, > >> > because fontification-functions (despite its name) really only works > >> > well with a single function (at least I don't know how to make it work > >> > well with more than one, based on how it's currently defined). > >> Is that because it's got to set 'fontified' properties? > > Yes. I see that I misunderstood what Alan was asking, and answered the wrong question. Sorry. > The problem is to figure out which of the functions should set this > property As you see from the fragment I posted, the functions are invoked in strict order of the list. So I guess the last one should do this? > and over which part of the buffer, since that property > should only be applied to the part of the buffer that's fontified by > all the functions (if the first functions fontifies 256 chars at a > time and the second 1000 chars at a time, the property should only > be set on the first 256 bytes). Sorry, I still don't get this: why do you need several functions that fontify different stretches of text, and why only the first stretch should be marked as fontified. Could you please tell some more about the context?