GNU bug report logs -
#192
regexp does not work as documented
Previous Next
Reported by: Bruno Haible <bruno <at> clisp.org>
Date: Tue, 6 May 2008 03:35:03 UTC
Severity: normal
Tags: unreproducible
Done: Andrew Hyatt <ahyatt <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
Message #70 received at 192 <at> emacsbugs.donarmstrong.com (full text, mbox):
martin rudalics <rudalics <at> gmx.at> writes:
>> First I'll work on the hi-lock warning as I described below, then I'll
>> see about detecting and doing something helpful for additional
>> situations where multi-line won't work.
>
> Think of the following pathological case: Devise a regexp to highlight
> the first line of a buffer provided the buffer does not end with a
> newline. Doing this with `font-lock-multiline' hardly makes any sense.
Ideally, highlight-regexp should work automagically, instead of forcing
users to do something extra to make their multi-line regexp work
properly. The right way to do this is probably for hi-lock-mode to
process the buffer initially, setting up text properties to make
font-lock DTRT even for multi-line expressions. But that's a big job.
As for making hi-lock-mode detect whether or not a regexp is multi-line,
isn't that a computationally non-trivial problem?
Maybe making hi-lock-mode turn on font-lock-multiline, while not
foolproof, works often enough to be satisfactory.
This bug report was last modified 9 years and 147 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.