[Top][All Lists]

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

Re: regexp does not work as documented

From: Stefan Monnier
Subject: Re: regexp does not work as documented
Date: Tue, 06 May 2008 21:04:19 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

> As an end user, for testing the effect of a regexp on a buffer interactively,
> I would prefer to have a "volatile" coloring (i.e. one that disappears at the
> next buffer modification) but is correct, rather than a documented-to-be-wrong
> coloring that updates itself correctly during buffer modifications. Less
> functionality but implemented correctly.

Actually, we can get the combination of the two.  hilight-changes
(c|sh)ould use its own loop with re-search-forward, even when font-lock
is enabled.  This way the highlighting would be initially correct, and
in some cases it would also be correctly preserved/discovered later on.

This would only be used for regexp that can span multiple lines, so
highlight-changes (c|sh)ould analyse the regexp to see if there's
a possibility for it to match multiple lines.


reply via email to

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