emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Auto-discovery of multi-line font-lock regexps


From: Chong Yidong
Subject: Re: Auto-discovery of multi-line font-lock regexps
Date: Tue, 06 May 2008 23:46:55 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

Stefan Monnier <address@hidden> 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)?




reply via email to

[Prev in Thread] Current Thread [Next in Thread]