[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#192: regexp does not work as documented
From: |
Stefan Monnier |
Subject: |
bug#192: regexp does not work as documented |
Date: |
Sun, 11 May 2008 21:28:18 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) |
> 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
Description: application/emacs-lisp
- bug#192: regexp does not work as documented, Bruno Haible, 2008/05/10
- bug#192: regexp does not work as documented, David Koppelman, 2008/05/10
- bug#192: regexp does not work as documented, David Koppelman, 2008/05/10
- bug#192: regexp does not work as documented, martin rudalics, 2008/05/11
- bug#192: regexp does not work as documented, Chong Yidong, 2008/05/11
- bug#192: regexp does not work as documented, David Koppelman, 2008/05/11
- bug#192: regexp does not work as documented, Stefan Monnier, 2008/05/11
- bug#192: regexp does not work as documented, David Koppelman, 2008/05/11
- bug#192: regexp does not work as documented,
Stefan Monnier <=
- bug#192: regexp does not work as documented, David Koppelman, 2008/05/12
- bug#192: regexp does not work as documented, Stefan Monnier, 2008/05/12
- bug#192: regexp does not work as documented, David Koppelman, 2008/05/12
- bug#192: regexp does not work as documented, Stefan Monnier, 2008/05/11
- bug#192: regexp does not work as documented, Thomas Lord, 2008/05/11
- bug#192: regexp does not work as documented, Stefan Monnier, 2008/05/11
- bug#192: regexp does not work as documented, Thomas Lord, 2008/05/12
- bug#192: regexp does not work as documented, Stefan Monnier, 2008/05/12
- bug#192: regexp does not work as documented, Thomas Lord, 2008/05/12
- bug#192: regexp does not work as documented, tomas, 2008/05/12