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 21:15:23 +0000 (GMT) Message-ID: References: <87r73ldfxu.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 1146005948 29409 80.91.229.2 (25 Apr 2006 22:59:08 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 25 Apr 2006 22:59:08 +0000 (UTC) Cc: Richard Stallman , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Apr 26 00:59:06 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 1FYWUo-0005oe-KZ for ged-emacs-devel@m.gmane.org; Wed, 26 Apr 2006 00:59:02 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FYWUo-0004I4-2M for ged-emacs-devel@m.gmane.org; Tue, 25 Apr 2006 18:59:02 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FYWSq-0002S7-Pa for emacs-devel@gnu.org; Tue, 25 Apr 2006 18:57:00 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FYWSq-0002Rl-EC for emacs-devel@gnu.org; Tue, 25 Apr 2006 18:57:00 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FYWSq-0002Rh-2N for emacs-devel@gnu.org; Tue, 25 Apr 2006 18:57:00 -0400 Original-Received: from [193.149.49.134] (helo=acm.acm) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FYWVL-0004Gv-Pg; Tue, 25 Apr 2006 18:59:36 -0400 Original-Received: from localhost (root@localhost) by acm.acm (8.8.8/8.8.8) with SMTP id VAA00360; Tue, 25 Apr 2006 21:15:23 GMT X-Sender: root@acm.acm Original-To: Stefan Monnier In-Reply-To: <87r73ldfxu.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:53432 Archived-At: Good evening, Stefan! On Tue, 25 Apr 2006, Stefan Monnier wrote: >> 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. >I'm not saying the hook is a kludge: I'm saying the code that uses it is >a kludge, compared to the code that uses font-lock-multiline. OK. I feel that existing code in AWK Mode is natural. (OK, I wrote it, so I'm not in a position to judge it dispassionately, but ...). It notes the logical EOL before a change. It notes the logical EOL after a change. The later one is the end position for fontification. By contrast, the f-l-multiline method (ab)uses the structure for setting face properties to set region boundaries for possible future changes. >>> ....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. >Yes, it needs such a hook called from font-lock-default-fontify-region. >Just like your current hook that's called from >font-lock-after-change-function. This is orthogonal. Agreed. [ .... ] > Stefan -- Alan.