Subject: Re: regexp does not work as documented

From: Stefan Monnier <[email-masked]>
Date: Tue, 06 May 2008 21:04:19 -0400

> 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.

        Stefan