From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Last steps for pretesting (font-lock-extend-region-function) Date: Thu, 20 Apr 2006 13:46:14 -0400 Message-ID: <87k69kqh7o.fsf-monnier+emacs@gnu.org> References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1145555197 28795 80.91.229.2 (20 Apr 2006 17:46:37 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 20 Apr 2006 17:46:37 +0000 (UTC) Cc: Richard Stallman , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Apr 20 19:46:35 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 1FWdEd-0006Li-TO for ged-emacs-devel@m.gmane.org; Thu, 20 Apr 2006 19:46:32 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FWdEd-00059B-Jg for ged-emacs-devel@m.gmane.org; Thu, 20 Apr 2006 13:46:31 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FWdES-000596-Cu for emacs-devel@gnu.org; Thu, 20 Apr 2006 13:46:20 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FWdEQ-00058u-0T for emacs-devel@gnu.org; Thu, 20 Apr 2006 13:46:19 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FWdEP-00058r-Oo for emacs-devel@gnu.org; Thu, 20 Apr 2006 13:46:17 -0400 Original-Received: from [209.226.175.25] (helo=tomts5-srv.bellnexxia.net) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FWdFl-0004OA-0O; Thu, 20 Apr 2006 13:47:41 -0400 Original-Received: from alfajor ([70.53.192.213]) by tomts5-srv.bellnexxia.net (InterMail vM.5.01.06.13 201-253-122-130-113-20050324) with ESMTP id <20060420174614.WSGE18394.tomts5-srv.bellnexxia.net@alfajor>; Thu, 20 Apr 2006 13:46:14 -0400 Original-Received: by alfajor (Postfix, from userid 1000) id 7F34AD91AB; Thu, 20 Apr 2006 13:46:14 -0400 (EDT) Original-To: Alan Mackenzie In-Reply-To: (Alan Mackenzie's message of "Wed, 19 Apr 2006 22:43:12 +0000 (GMT)") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) 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:53144 Archived-At: >> BTW, I still intend to move font-lock-extend-region-function from >> after-change-functions to font-lock-fontify-region (or maybe even >> jit-lock-fontify). > That would radically change the meaning of the function. Of course. > Please keep Font Lock working equivalently with and without JIT switched > on. Edebugging through font-lock-fontify-region (for debugging a mode's > font lock settings) is a nightmare when JIT is enabled. Yes, OK, don't worry about the jit side-comment. > How about the following compromise? font-lock-extend-region-function > should get called BOTH in the two after-change functions AND in > jit-lock-fontify-now and font-lock-default-fontify-region. No, my problem is specifically with calling it from after-change-functions. >> So if you really manage to use the current >> font-lock-extend-region-function (called from after-change-functions) in >> a way that's robust, efficient, ..... > So far, yes (except, perhaps, for the need of an extend-region function > in j-l-f-n and f-l-d-f-r). So your code needs extend-region both in a-c-f and in f-l-d-f-r ? >> .... and can't be done as efficiently/elegantly/robustly with a hook in >> font-lock-fontify-region (or with the font-lock-multiline property), >> please scream. > AAAAAAAAARRRRRRRRRRRRRRGGGGGGGGGGGGGGGGGGHHHHHHHHHHHHHHHHHHHHHH!!!!!!!!!!! > I don't think we're going to agree on the relative elegance of > font-lock-extend-region-function vs. font-lock-multiline. I think that > the former is more elegant than the latter, and you think the latter is > the more elegant. Of course, we don't have to agree on every detail. > I'm convinced that either approach would be robust (hey, we're competent > hackers ;-). I'm convinced that only using a-c-f would *not* be robust, no matter how competent the hacker. > However, I think that f-l-extend-region-function can be done more > efficiently by the major mode maintainer, in the sense that it will > require less time and effort reading manuals, reading fine source, and > coding. more efficiently than what? Stefan