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: font-lock-multiline for cc-awk. Date: Wed, 26 Apr 2006 07:37:54 +0000 (GMT) Message-ID: References: Reply-To: Alan Mackenzie NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Trace: sea.gmane.org 1146048043 20142 80.91.229.2 (26 Apr 2006 10:40:43 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 26 Apr 2006 10:40:43 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Apr 26 12:40:38 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 1FYhRb-0005t7-Dv for ged-emacs-devel@m.gmane.org; Wed, 26 Apr 2006 12:40:28 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FYhRb-0008MZ-6g for ged-emacs-devel@m.gmane.org; Wed, 26 Apr 2006 06:40:27 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FYhRQ-0008MQ-Tf for emacs-devel@gnu.org; Wed, 26 Apr 2006 06:40:16 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FYhRP-0008Lp-PP for emacs-devel@gnu.org; Wed, 26 Apr 2006 06:40:16 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FYhRP-0008Ll-MA for emacs-devel@gnu.org; Wed, 26 Apr 2006 06:40:15 -0400 Original-Received: from [193.149.49.134] (helo=acm.acm) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FYhU3-0002aR-Ow for emacs-devel@gnu.org; Wed, 26 Apr 2006 06:43:00 -0400 Original-Received: from localhost (root@localhost) by acm.acm (8.8.8/8.8.8) with SMTP id HAA00569; Wed, 26 Apr 2006 07:37:55 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:53459 Archived-At: Hi, Stefan! On Tue, 25 Apr 2006, Stefan Monnier wrote: >AFAICT the patch below converts cc-awk to use font-lock-multiline >instead of an after-change-function. You've rubbed out my after-change function! Heeeellllllllllpppppppp!! The after-change function is needed to set syntax-table text properties, since this must be done regardless of whether font lock is enabled. In fact, it's a massive pain in the posterior that font lock erases these text properties without getting permission from the major mode. This is the only reason that c-awk-set-syntax-table-properties is hooked into font-lock-syntactic keywords - essentially, the syntax-table properties are an after-change thing. I don't want to mix up the syntax-table and f-l-multiline properties, because they're very different things. Doing so would weaken the existing functions, which are strong single-purpose functions. To do things this sort of way, I'd put in a new function c-awk-set-fl-multiline-properties (a sister function to c-awk-set-syntax-table-properties, with the same calling conventions). The existing function loops round string/regexp/division sign constructs, whereas the new one would be looping round lines. They don't mix very happily. But mainly, I don't want to be applying f-l-m properties throughout the region[*]. They should be applied only at the region boundaries when these need extending, and only when font lock is enabled, since they serve no purpose otherwise. [*] As you're aware, I don't want to use f-l-m properties at all. But if I must use them, I only want them where absolutely needed. And you've rubbed out my before-change function! Ruuuuuunnnnnnnn awwwwwaaaayyyyyyy!!!!!!! This is needed for other things besides calculating font lock boundaries. Why not leave things alone until Richard has settled the whole matter? > Stefan [ Patch tentatively applied and examined. ] -- Alan.