From: Stefan Monnier <monnier@iro.umontreal.ca>
To: help-gnu-emacs@gnu.org
Subject: Re: Regexp search: syntax class for comment starter (\s<) does not work consistently in all modes
Date: Fri, 27 Sep 2019 17:32:43 -0400 [thread overview]
Message-ID: <jwv36gh5sxb.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: 20190927202211.3onie75t3ydknsmb@peruna.fi
> Seems that regexp search for comment starter syntax class, \s<,
> doesn't work out of the box in ...
It doesn't do what you think: it looks for characters with the < syntax.
These chars are recognized as starting a comment (tho it depends where
they appear, e.g. within a string), but they're not the only kinds of
chars that can start a comment.
If you want to look for comments, you're probably better off using
something like comment-search-forward (or comment-start-skip).
Stefan
next prev parent reply other threads:[~2019-09-27 21:32 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-27 20:22 Regexp search: syntax class for comment starter (\s<) does not work consistently in all modes Janne Nykopp
2019-09-27 21:32 ` Stefan Monnier [this message]
2019-10-01 20:08 ` Janne Nykopp
2019-10-02 1:44 ` Stefan Monnier
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=jwv36gh5sxb.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=help-gnu-emacs@gnu.org \
/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.
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).