[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Regexp search: syntax class for comment starter (\s<) does not work
From: |
Stefan Monnier |
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 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
> 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