From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ralf Angeli Newsgroups: gmane.emacs.devel Subject: Re: Last steps for pretesting (font-lock-extend-region-function) Date: Tue, 25 Apr 2006 22:58:52 +0200 Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1145998671 6916 80.91.229.2 (25 Apr 2006 20:57:51 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 25 Apr 2006 20:57:51 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Apr 25 22:57:49 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 1FYUbS-0007QA-LP for ged-emacs-devel@m.gmane.org; Tue, 25 Apr 2006 22:57:46 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FYUbS-0001jU-KN for ged-emacs-devel@m.gmane.org; Tue, 25 Apr 2006 16:57:46 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FYUbG-0001jO-ES for emacs-devel@gnu.org; Tue, 25 Apr 2006 16:57:34 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FYUbE-0001gy-3f for emacs-devel@gnu.org; Tue, 25 Apr 2006 16:57:33 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FYUbD-0001gg-OL for emacs-devel@gnu.org; Tue, 25 Apr 2006 16:57:31 -0400 Original-Received: from [80.91.229.2] (helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1FYUdk-0003Uo-IX for emacs-devel@gnu.org; Tue, 25 Apr 2006 17:00:08 -0400 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1FYUay-0007JI-5k for emacs-devel@gnu.org; Tue, 25 Apr 2006 22:57:16 +0200 Original-Received: from dialin-212-144-187-024.pools.arcor-ip.net ([212.144.187.24]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 25 Apr 2006 22:57:16 +0200 Original-Received: from angeli by dialin-212-144-187-024.pools.arcor-ip.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 25 Apr 2006 22:57:16 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-To: emacs-devel@gnu.org Original-Lines: 36 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: dialin-212-144-187-024.pools.arcor-ip.net Cancel-Lock: sha1:HlVw3Tb3iATgmbtlO/JwjGRlNZU= 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:53418 Archived-At: * Stefan Monnier (2006-04-25) writes: >> Now I feel a bit guilty that I didn't mention this earlier. Anyway, I >> thought that a hook in f-l-d-f-r might be useful despite the >> possibility mentioned above as a "documentable" and common way of >> extending the region. But you are right, it's not really necessary. > > I was thinking of documenting this use of font-lock-fontify-region-function > in the new "multi line font lock elements" node of the elisp manual. > Do you think a separate hook is still necessary? If the above mentioned use of f-l-f-r-f will be documented, the need for a hook diminishes even further. It would only serve as a more convenient way of achieving the same thing. So, no, I don't think the hook is still necessary. > The way I see it, a separate hook would only really make sense if it were > a "normal" hook where you can place several functions, so that minor modes > can also use it reliably and easily. Yes. In AUCTeX I used a regular list, not a hook, for this purpose. >> But then, IMO, a hook in `after-change-functions' is not strictly >> necessary either. Its only benefit might be that refontification of >> the extended region happens faster. > > I don't understand what you're saying here. When experimenting with extension of the region to be fontified in AUCTeX I advised `jit-lock-after-change' to do this extension and with that piece of advice refontification of a multiline construct after a buffer change happened immediately while without the advice it took a few moments. Possibly as long as `jit-lock-context-time' IIUC. -- Ralf