From: Michael Heerdegen <michael_heerdegen@web.de>
To: jan <rtm443x@googlemail.com>
Cc: 41185@debbugs.gnu.org
Subject: bug#41185: highlight-regexp not working properly
Date: Tue, 12 May 2020 00:55:16 +0200 [thread overview]
Message-ID: <87v9l2oze3.fsf@web.de> (raw)
In-Reply-To: <CADJx9LcLOrbbUmL4VvqWoMDWc9Mt2D2b8sY3Kg=dPTJuwo84ng@mail.gmail.com> (jan's message of "Mon, 11 May 2020 12:24:55 +0100")
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.
next prev parent reply other threads:[~2020-05-11 22:55 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-11 11:24 bug#41185: highlight-regexp not working properly jan via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-05-11 22:55 ` Michael Heerdegen [this message]
2021-06-13 11:37 ` bug#41185: highlight-regexp not working properly for multiline-matching regexps Lars Ingebrigtsen
2021-06-13 16:37 ` Michael Heerdegen
2021-06-13 17:11 ` Lars Ingebrigtsen
2021-06-15 13:25 ` jan via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-06-15 23:37 ` Michael Heerdegen
2021-06-16 5:20 ` jan via Bug reports for GNU Emacs, the Swiss army knife of text editors
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87v9l2oze3.fsf@web.de \
--to=michael_heerdegen@web.de \
--cc=41185@debbugs.gnu.org \
--cc=rtm443x@googlemail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).