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

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

Regexp search: syntax class for comment starter (\s<) does not work cons


From: Janne Nykopp
Subject: Regexp search: syntax class for comment starter (\s<) does not work consistently in all modes
Date: Fri, 27 Sep 2019 23:22:11 +0300
User-agent: NeoMutt/20170113 (1.7.2)

Hello!

Seems that regexp search for comment starter syntax class, \s<,
doesn't work out of the box in C, C++, Java, javascript (neither for
// or /* comment styles), or pascal ((*), ada or sql (--) modes, for
instance.

It does work out of the box in e.g. lisp (;) - but not for the
two-character comment delimiter (#|), sh (#), fortran (C and !),
postscript ps-mode (%), DOS batch bat-mode (:: and REM), HTML mode
(<!--) ...

I find this strange, because e.g. bat-mode's or html-mode's syntax
specifications (C-h s) don't say anything about comments. On the other
hand, C and the other modes have syntax specifications filled with
detailed comment syntax information. Hence, I'd expect it to be
vice-versa, that \s< wouldn't work in bat-mode but would in c-mode.

I tested with freshly compiled emacs-24.5, 25.3 and 26.3, launching
them with emacs -q -Q. They all seem to behave identically.

I'm wondering whether it's a known and accepted issue that comment
starter syntax class regexp search doesn't quite work in all modes?

Best regards,
Janne Nykopp



reply via email to

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