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:12:28 +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 1145995921 30100 80.91.229.2 (25 Apr 2006 20:12:01 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 25 Apr 2006 20:12:01 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Apr 25 22:11:59 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 1FYTt3-00064m-L2 for ged-emacs-devel@m.gmane.org; Tue, 25 Apr 2006 22:11:53 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FYTt2-00066l-Q1 for ged-emacs-devel@m.gmane.org; Tue, 25 Apr 2006 16:11:52 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FYTsS-0005Xi-UC for emacs-devel@gnu.org; Tue, 25 Apr 2006 16:11:17 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FYTsR-0005WG-0l for emacs-devel@gnu.org; Tue, 25 Apr 2006 16:11:16 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FYTsQ-0005WC-PS for emacs-devel@gnu.org; Tue, 25 Apr 2006 16:11:14 -0400 Original-Received: from [199.232.41.67] (helo=mx20.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1FYTux-0006NS-9F for emacs-devel@gnu.org; Tue, 25 Apr 2006 16:13:51 -0400 Original-Received: from [80.91.229.2] (helo=ciao.gmane.org) by mx20.gnu.org with esmtp (Exim 4.52) id 1FYTsP-0003Pt-KL for emacs-devel@gnu.org; Tue, 25 Apr 2006 16:11:13 -0400 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1FYTsC-0005vz-RF for emacs-devel@gnu.org; Tue, 25 Apr 2006 22:11:00 +0200 Original-Received: from dialin-212-144-207-157.pools.arcor-ip.net ([212.144.207.157]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 25 Apr 2006 22:11:00 +0200 Original-Received: from angeli by dialin-212-144-207-157.pools.arcor-ip.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 25 Apr 2006 22:11:00 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-To: emacs-devel@gnu.org Original-Lines: 27 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: dialin-212-144-207-157.pools.arcor-ip.net Cancel-Lock: sha1:rxHS1abwhw+jfOhS/5THASZpBFg= 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:53411 Archived-At: * Stefan Monnier (2006-04-25) writes: >> Hopefully I understand "your solution" correctly here if I am assuming >> this relates to putting the hook into >> `font-lock-default-fontify-region'. I've implemented a variant of >> this approach for AUCTeX by using a custom-made function for >> `font-lock-fontify-region-function' which calls other functions for >> extending the region and then calls `font-lock-default-fontify-region' >> with the extended region as arguments. There is no special code in >> `after-change-functions' and the approach actually works quite well. > > Hey, that's a very good point. There isn't any real need for a new > "extend-region" hook in font-lock-default-fontify-region since we can simply > use the font-lock-fontify-region-function hook for that purpose. > > Thanks for pointing it out, 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. 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. -- Ralf