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: Thu, 28 Jan 2010 21:18:05 +0200 Message-ID: <83fx5qt4wi.fsf@gnu.org> References: <20100127153733.GD3432@muc.de> <83k4v34f49.fsf@gnu.org> <83fx5r48gd.fsf@gnu.org> <20100128103856.GC2285@muc.de> <20100128144707.GF2285@muc.de> Reply-To: Eli Zaretskii NNTP-Posting-Host: lo.gmane.org X-Trace: ger.gmane.org 1264706324 9214 80.91.229.12 (28 Jan 2010 19:18:44 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 28 Jan 2010 19:18:44 +0000 (UTC) Cc: monnier@iro.umontreal.ca, emacs-devel@gnu.org To: Alan Mackenzie Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jan 28 20:18:40 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 1NaZt0-0002gz-Fz for ged-emacs-devel@m.gmane.org; Thu, 28 Jan 2010 20:18:38 +0100 Original-Received: from localhost ([127.0.0.1]:58350 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NaZsz-0003xL-Mx for ged-emacs-devel@m.gmane.org; Thu, 28 Jan 2010 14:18:37 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NaZst-0003wy-M6 for emacs-devel@gnu.org; Thu, 28 Jan 2010 14:18:31 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NaZso-0003uH-Vv for emacs-devel@gnu.org; Thu, 28 Jan 2010 14:18:31 -0500 Original-Received: from [199.232.76.173] (port=35473 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NaZso-0003uC-TJ for emacs-devel@gnu.org; Thu, 28 Jan 2010 14:18:26 -0500 Original-Received: from mtaout20.012.net.il ([80.179.55.166]:62944) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NaZso-0006BC-GZ for emacs-devel@gnu.org; Thu, 28 Jan 2010 14:18:26 -0500 Original-Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0KWZ00L000MZ9800@a-mtaout20.012.net.il> for emacs-devel@gnu.org; Thu, 28 Jan 2010 21:18:07 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([77.127.180.161]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0KWZ00GHW1M6WAE0@a-mtaout20.012.net.il>; Thu, 28 Jan 2010 21:18:07 +0200 (IST) In-reply-to: <20100128144707.GF2285@muc.de> 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:120602 Archived-At: > Date: Thu, 28 Jan 2010 14:47:07 +0000 > Cc: monnier@iro.umontreal.ca, emacs-devel@gnu.org > From: Alan Mackenzie > > > > (defun foo-before-display (buffer beg end) .....) > > > > , BEG and END defining the piece of BUFFER about to be displayed. > > > The hook would be called before fontification. > > > What do you mean by ``before fontification'', and why does it have to > > be before that? > > I don't really know what I mean by "before fontification". I want it so > that if in `foo-before-display' I put syntax-table TP on < and >, and > point happens to be at one of them, show-paren-mode will work to > highlight them. Why do you need to do that only when the text is about to be displayed? Is it too expensive to do that in the whole buffer or something? Anyway, show-paren-mode works off an idle timer, so I think it is not necessary to run the kind of function you have in mind before redisplay; near its end is okay. > Maybe an alternative to a hook here would be to allow an application to > specify that some text property (say, 'c-templatified) is to be > "special", and when the displayer detects the TP has changed, it calls an > associated function. 'c-templatified would be analogous to 'fontified. Don't we already have text properties that cause Lisp forms to be evaluated? And again, why can't you put your text property everywhere in the buffer where you want this effect?