From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chong Yidong Newsgroups: gmane.emacs.devel Subject: Re: Auto-discovery of multi-line font-lock regexps Date: Tue, 06 May 2008 23:46:55 -0400 Message-ID: <873aoupyhc.fsf@stupidchicken.com> References: <87k5i8ukq8.fsf@stupidchicken.com> <200805062335.59206.bruno@clisp.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1210132320 16376 80.91.229.12 (7 May 2008 03:52:00 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 7 May 2008 03:52:00 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed May 07 05:52:34 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Jtahj-0004F6-RI for ged-emacs-devel@m.gmane.org; Wed, 07 May 2008 05:52:32 +0200 Original-Received: from localhost ([127.0.0.1]:47621 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Jtah1-0004BJ-RC for ged-emacs-devel@m.gmane.org; Tue, 06 May 2008 23:51:47 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Jtagy-0004B0-3L for emacs-devel@gnu.org; Tue, 06 May 2008 23:51:44 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Jtagw-0004AE-Iz for emacs-devel@gnu.org; Tue, 06 May 2008 23:51:42 -0400 Original-Received: from [199.232.76.173] (port=38821 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Jtagw-0004A3-DT for emacs-devel@gnu.org; Tue, 06 May 2008 23:51:42 -0400 Original-Received: from cyd.mit.edu ([18.115.2.24]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Jtagw-0004w8-0z for emacs-devel@gnu.org; Tue, 06 May 2008 23:51:42 -0400 Original-Received: by cyd.mit.edu (Postfix, from userid 1000) id 926184E4DA; Tue, 6 May 2008 23:46:55 -0400 (EDT) In-Reply-To: (Stefan Monnier's message of "Tue, 06 May 2008 21:08:33 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 2) 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:96646 Archived-At: Stefan Monnier writes: > While reading the "regexp does not work as documented" thread, an idea > came to me: we could have an idle task that takes the font-lock regexps > and instead of applying them directly, only uses them to find matches > that span multiple lines and mark them with the > `font-lock-multiline' property. > > The idea is that the font-lock-multiline works OK to preserve multiline > matches, so the real difficulty is in making sure we discover > them correctly. Sometimes we do by happenstance, sometimes we do > because the major-mode was careful to make it work (which is far from > trivial), but often we just don't. Having such a background loop would > be very helpful. Its job can easily be stopped at any time, so it > shouldn't introduce long latencies. Sounds like a good idea, but wouldn't that run into the same problem with the JIT lock stealth timer that necessitated setting jit-lock-stealth-time to nil (i.e., people on laptops complaining about Emacs eating CPU)?