bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#41185: highlight-regexp not working properly


From: Michael Heerdegen
Subject: bug#41185: highlight-regexp not working properly
Date: Tue, 12 May 2020 00:55:16 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

jan <rtm443x@googlemail.com> writes:

> Try to regexp-highlight particular preprocessor use:
>
> M-s h r def HALF_LJ[^^]+?# endif RET
>
> (the [^^] is because I want it to match multiline, and I don't expect
> any carets in the text, so I negate that to allow newline matches and
> make it lazy to pick out the shortest +?  It's sloppy but ok here)
>
> Does not highlight anything

Yes, thanks.

I can reproduce this.  I'm not a font-lock expert, but I suspect that
hi-lock doesn't support patterns matching multi-line text.  Font-lock
supports multi-line matching, but this needs some extra efforts to work,
and I don't think hi-lock is caring about this at all.

If this is correct, maybe this feature can be implemented, and until
then, this limitation should be explicitly documented.


Michael.





reply via email to

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