[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Auto-discovery of multi-line font-lock regexps
From: |
Stefan Monnier |
Subject: |
Auto-discovery of multi-line font-lock regexps |
Date: |
Tue, 06 May 2008 21:08:33 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) |
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.
Stefan
- Re: regexp does not work as documented, (continued)
Re: regexp does not work as documented, Stefan Monnier, 2008/05/06
Re: regexp does not work as documented, David Koppelman, 2008/05/06