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: Is there something like `on-display-functions'? Date: Wed, 27 Jan 2010 14:24:18 -0500 Message-ID: References: <20100127135716.GA3432@muc.de> <20100127153733.GD3432@muc.de> <83k4v34f49.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1264620431 3455 80.91.229.12 (27 Jan 2010 19:27:11 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 27 Jan 2010 19:27:11 +0000 (UTC) Cc: Alan Mackenzie , emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jan 27 20:27:07 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 1NaDVE-0002FG-8d for ged-emacs-devel@m.gmane.org; Wed, 27 Jan 2010 20:24:36 +0100 Original-Received: from localhost ([127.0.0.1]:45572 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NaDVD-0004jK-DC for ged-emacs-devel@m.gmane.org; Wed, 27 Jan 2010 14:24:35 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NaDV7-0004ij-Mp for emacs-devel@gnu.org; Wed, 27 Jan 2010 14:24:29 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NaDV2-0004hk-Jw for emacs-devel@gnu.org; Wed, 27 Jan 2010 14:24:28 -0500 Original-Received: from [199.232.76.173] (port=51576 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NaDV2-0004he-Fd for emacs-devel@gnu.org; Wed, 27 Jan 2010 14:24:24 -0500 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:22425 helo=ironport2-out.pppoe.ca) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NaDUz-0003yb-KR; Wed, 27 Jan 2010 14:24:21 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ArUEAKohYEtFpaAe/2dsb2JhbACBNNhShDkEilE X-IronPort-AV: E=Sophos;i="4.49,355,1262581200"; d="scan'208";a="54692884" Original-Received: from 69-165-160-30.dsl.teksavvy.com (HELO pastel.home) ([69.165.160.30]) by ironport2-out.pppoe.ca with ESMTP; 27 Jan 2010 14:24:19 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id 05FFD88D6; Wed, 27 Jan 2010 14:24:19 -0500 (EST) In-Reply-To: <83k4v34f49.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 27 Jan 2010 19:44:22 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.91 (gnu/linux) X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. 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:120520 Archived-At: >> > 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. > No, I don't think so. The handler of the `fontified' property checks > for the property's value being nil only once, and then runs all the > functions in fontification-functions in a loop. The relevant code is > below. That's not the problem. The problem is to figure out which of the functions should set this property 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). Stefan