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 07:45:06 +0000 (GMT) Message-ID: References: <87wtdeel1y.fsf-monnier+emacs@gnu.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Trace: sea.gmane.org 1145964681 6632 80.91.229.2 (25 Apr 2006 11:31:21 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 25 Apr 2006 11:31:21 +0000 (UTC) Cc: Richard Stallman , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Apr 25 13:31:19 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 1FYLl7-0005BR-7I for ged-emacs-devel@m.gmane.org; Tue, 25 Apr 2006 13:31:09 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FYLl6-0001Oi-Jr for ged-emacs-devel@m.gmane.org; Tue, 25 Apr 2006 07:31:08 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FYLk0-0000iE-U1 for emacs-devel@gnu.org; Tue, 25 Apr 2006 07:30:00 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FYLk0-0000h7-4O for emacs-devel@gnu.org; Tue, 25 Apr 2006 07:30:00 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FYLjz-0000gn-TH for emacs-devel@gnu.org; Tue, 25 Apr 2006 07:29:59 -0400 Original-Received: from [193.149.49.134] (helo=acm.acm) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FYLmO-0005YJ-HQ; Tue, 25 Apr 2006 07:32:30 -0400 Original-Received: from localhost (root@localhost) by acm.acm (8.8.8/8.8.8) with SMTP id HAA00693; Tue, 25 Apr 2006 07:45:07 GMT X-Sender: root@acm.acm Original-To: Stefan Monnier In-Reply-To: <87wtdeel1y.fsf-monnier+emacs@gnu.org> 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:53370 Archived-At: Hi, Stefan! On Mon, 24 Apr 2006, Stefan Monnier wrote: >> I say to you again - your solution is not robust. I don't think it's >> been tried at all (correct me if I'm wrong). >Of course it has, in smerge-mode (since Emacs-21.1) which I use daily, in >cvs-status (since Emacs-21.1) in perl-mode (since some time in late 2004 >IIRC), in sh-script.el (a bit before perl-mode IIRC), in message.el (where >it's been buggy at times because I didn't understand that I needed >a font-lock-default-fontify-region hook). >They do all suffer from the missing font-lock-default-fontify-region >hook, just like your code, of course. >> So - please leave the better tested mechanism in place. >I don't claim it's buggy or even more buggy than font-lock-multiline. >It's just an ugly kludge, ..... I can't understand at all why you feel that. I really can't. To me, f-l-e-r-f seems natural, simple and obvious. Optionally setting a hook variable to a function is done countless times in Emacs. I can't see why font-lock-extend-region-function is any more ugly than, say, adaptive-fill-function. >....much more heavyweight codewise (this is objectively the case in >terms of lines of code, and I hope my comparison above convinces a few >more people that it's also subjectively the case). This is not the case. We're agreed that, for the f-l-multiline mechanism to work, it needs supplementing by a f-l-extend-region-function hook. If we need this hook anyway, why complicate it with f-l-multiline when the hook works just fine on its own? > Stefan -- Alan.