From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.devel Subject: Re: Last steps for pretesting (font-lock-extend-region-function) Date: Tue, 25 Apr 2006 22:30:17 +0000 (GMT) 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 1146005891 29256 80.91.229.2 (25 Apr 2006 22:58:11 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 25 Apr 2006 22:58:11 +0000 (UTC) Cc: Ralf Angeli , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Apr 26 00:58:08 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 1FYWTh-0005cu-Hq for ged-emacs-devel@m.gmane.org; Wed, 26 Apr 2006 00:57:55 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FYWTh-0002vP-1x for ged-emacs-devel@m.gmane.org; Tue, 25 Apr 2006 18:57:53 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FYWSf-0002MO-6E for emacs-devel@gnu.org; Tue, 25 Apr 2006 18:56:49 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FYWSe-0002Ly-E3 for emacs-devel@gnu.org; Tue, 25 Apr 2006 18:56:48 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FYWSe-0002Lr-97 for emacs-devel@gnu.org; Tue, 25 Apr 2006 18:56:48 -0400 Original-Received: from [193.149.49.134] (helo=acm.acm) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FYWVB-0004Gv-TG for emacs-devel@gnu.org; Tue, 25 Apr 2006 18:59:26 -0400 Original-Received: from localhost (root@localhost) by acm.acm (8.8.8/8.8.8) with SMTP id WAA00412; Tue, 25 Apr 2006 22:30:18 GMT X-Sender: root@acm.acm Original-To: Stefan Monnier In-Reply-To: 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:53430 Archived-At: Hi, Stefan! On Tue, 25 Apr 2006, Stefan Monnier wrote: >> 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. Would this not be very inconvenient? Somebody needing the extend-region functionality in f-l-d-f-r would then have to copy the entire source of the default function, amend the source, make the f-l-fontify-region-funtion buffer local, then set it. > Stefan -- Alan.