From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.devel Subject: Re: Regexp for c-or-c++-mode Date: Tue, 9 Jun 2020 20:12:55 +0000 Message-ID: <20200609201255.GB7104@ACM> References: <20200607164100.GB6212@ACM> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="33780"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: =?utf-8?Q?Micha=C5=82?= Nazarewicz Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Jun 09 22:17:40 2020 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jikgm-0008hq-Mf for ged-emacs-devel@m.gmane-mx.org; Tue, 09 Jun 2020 22:17:40 +0200 Original-Received: from localhost ([::1]:53116 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jikgl-00011G-Nr for ged-emacs-devel@m.gmane-mx.org; Tue, 09 Jun 2020 16:17:39 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59734) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jikcJ-00042b-C1 for emacs-devel@gnu.org; Tue, 09 Jun 2020 16:13:03 -0400 Original-Received: from colin.muc.de ([193.149.48.1]:59894 helo=mail.muc.de) by eggs.gnu.org with smtp (Exim 4.90_1) (envelope-from ) id 1jikcH-0006CA-Uu for emacs-devel@gnu.org; Tue, 09 Jun 2020 16:13:03 -0400 Original-Received: (qmail 56625 invoked by uid 3782); 9 Jun 2020 20:12:57 -0000 Original-Received: from acm.muc.de (p4fe15c32.dip0.t-ipconnect.de [79.225.92.50]) by localhost.muc.de (tmda-ofmipd) with ESMTP; Tue, 09 Jun 2020 22:12:56 +0200 Original-Received: (qmail 5618 invoked by uid 1000); 9 Jun 2020 20:12:55 -0000 Content-Disposition: inline In-Reply-To: X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de Received-SPF: pass client-ip=193.149.48.1; envelope-from=acm@muc.de; helo=mail.muc.de X-detected-operating-system: by eggs.gnu.org: First seen = 2020/06/09 16:12:57 X-ACL-Warn: Detected OS = FreeBSD 9.x or newer [fuzzy] X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:252065 Archived-At: Hello, Micha�. On Sun, Jun 07, 2020 at 19:07:12 +0100, Michał Nazarewicz wrote: > On Sun, 7 Jun 2020 at 17:41, Alan Mackenzie 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? > -- > Best regards > ミハウ “𝓶𝓲𝓷𝓪86” ナザレヴイツ > «If at first you don’t succeed, give up skydiving» -- Alan Mackenzie (Nuremberg, Germany).