[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Regexp for c-or-c++-mode
From: |
Michał Nazarewicz |
Subject: |
Re: Regexp for c-or-c++-mode |
Date: |
Wed, 10 Jun 2020 12:35:19 +0100 |
On Tue, 9 Jun 2020 at 21:13, Alan Mackenzie <acm@muc.de> wrote:
> On Sun, Jun 07, 2020 at 19:07:12 +0100, Michał Nazarewicz wrote:
> > On Sun, 7 Jun 2020 at 17:41, Alan Mackenzie <acm@muc.de> wrote:
> > > In c-or-c++-mode--regexp, there are several occurrences of
>
> > > [ \t\r]
>
> > > . These expressions notably lack \n. This seems strange, given how \n
> > > is the normal line terminator in Emacs and \r is a rarely used artefact.
>
> > I wanted the regex to match single-line rather than multi-line statements
> > to avoid false positives. Though, other than #include lines, either will
> > probably work equally well.
>
> I don't fully understand. Why have you got the \r there?
I suppose you’re right. It should be [ \t\v\f] instead to catch
all non-new-line white-space characters. Or [ \t\v\f\r\n] to catch
all white-space characters.
--
Best regards
ミハウ “𝓶𝓲𝓷𝓪86” ナザレヴイツ
«If at first you don’t succeed, give up skydiving»
- Regexp for c-or-c++-mode, Alan Mackenzie, 2020/06/07
- Re: Regexp for c-or-c++-mode, Michał Nazarewicz, 2020/06/07
- Re: Regexp for c-or-c++-mode, Alan Mackenzie, 2020/06/09
- Re: Regexp for c-or-c++-mode,
Michał Nazarewicz <=
- Re: Regexp for c-or-c++-mode, Robert Pluim, 2020/06/10
- Re: Regexp for c-or-c++-mode, Michał Nazarewicz, 2020/06/10
- Re: Regexp for c-or-c++-mode, Robert Pluim, 2020/06/10
- Re: Regexp for c-or-c++-mode, Michał Nazarewicz, 2020/06/10
- Re: Regexp for c-or-c++-mode, Alan Mackenzie, 2020/06/11