unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Regexp search: syntax class for comment starter (\s<) does not work consistently in all modes
@ 2019-09-27 20:22 Janne Nykopp
  2019-09-27 21:32 ` Stefan Monnier
  0 siblings, 1 reply; 4+ messages in thread
From: Janne Nykopp @ 2019-09-27 20:22 UTC (permalink / raw)
  To: help-gnu-emacs

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



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-10-02  1:44 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2019-10-01 20:08   ` Janne Nykopp
2019-10-02  1:44     ` Stefan Monnier

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).