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 #100 received at 192 <at> emacsbugs.donarmstrong.com (full text, mbox):
[Message part 1 (text/plain, inline)]
> A better solution would be to have font-lock use multi-line extended
> regions selectively. Perhaps a hint in the current keyword syntax
> (say, explicitly applying the font-lock-multiline property), or a
> separate method for providing multi-line keywords to font-lock.
I don't understand the difference between the above and the application
of font-lock-multiline properties which you seem to have tried and rejected.
I don't necessarily disagree with your rejection of font-lock-multiline:
it can have disastrous effect indeed if the multiline region becomes large.
> Such keywords would get the multi-line extended regions, the other
> just the whole-line extensions (or whatever the hooks do).
> Is this something the font-lock maintainers would consider?
I guess I simply do not understand what you propose. Any improvement in
the multiline handling is welcome, but beware: this is not an easy area.
>> (while (re-search-forward <RE> nil t)
>> (font-lock-fontify-region (match-beginning 0) (match-end 0)))
> I wouldn't do that without suppressing other keywords.
FWIW, I do pretty much exactly the above loop in smerge-mode and
I haven't heard complaints yet.
>> If someone wants that, I have a parser that takes a regexp and turns it
>> into something like `rx' syntax. It uses my lex.el library (which
>> takes an `rx'-like input syntax).
> That sounds useful, either E-mail it to me or let me know
> where to find it.
Find the current version attached. Consider it as 99.9% untested
code, tho. Also you need to eval it before you can byte-compile it.
And I strongly recommend you byte-compile it to reduce the
specpdl usage.
Stefan
[lex.el (application/emacs-lisp, attachment)]
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.