From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Robert Pluim Newsgroups: gmane.emacs.devel Subject: Re: Regexp for c-or-c++-mode Date: Wed, 10 Jun 2020 13:40:21 +0200 Message-ID: References: <20200607164100.GB6212@ACM> <20200609201255.GB7104@ACM> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="22369"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Alan Mackenzie , 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 Wed Jun 10 13:41:54 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 1jiz7B-0005iq-VO for ged-emacs-devel@m.gmane-mx.org; Wed, 10 Jun 2020 13:41:53 +0200 Original-Received: from localhost ([::1]:38910 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jiz7A-0007ZY-U9 for ged-emacs-devel@m.gmane-mx.org; Wed, 10 Jun 2020 07:41:52 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41006) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jiz5w-0006cO-SY for emacs-devel@gnu.org; Wed, 10 Jun 2020 07:40:36 -0400 Original-Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]:51554) by eggs.gnu.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jiz5v-0007lv-Qq for emacs-devel@gnu.org; Wed, 10 Jun 2020 07:40:36 -0400 Original-Received: by mail-wm1-x32c.google.com with SMTP id u13so1514878wml.1 for ; Wed, 10 Jun 2020 04:40:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:gmane-reply-to-list:date:in-reply-to :message-id:mime-version:content-transfer-encoding; bh=vki8Qa2S0MAmGFLF8FFUE403HHhp8sVYQyLLJRJB2rw=; b=NS+6JzfB8PTAPLdlayN6HY1Y3lfKWn40iMdKGJYq8fH3VsqJWo8C1ZQeDg59CswlNz GVDGniL9Uu7jF26mInAdIrCKm6mFrPaRLspCFYkMsFwSVJhCEpKqmBwWgQpGbScpfixz axLPRNV16aTCoOBFUGPQMIkHuO8n+8vB4ImNst0grfVyQqSypwuqlKa4IlYwUJ2OyK/7 Jps7XDIfaSsM71k6PECM56ECWVwplgCZPdnmm5RapTOk2Qc+UsYlz/2ufr9TVRZYzGZJ HG3Nxc1zuqXDnU0S/3VcO8Kdifdnf4d3verb0UulFg0F3BWvH2Z/E8m1W9SUIHk3tttn V8uQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references :gmane-reply-to-list:date:in-reply-to:message-id:mime-version :content-transfer-encoding; bh=vki8Qa2S0MAmGFLF8FFUE403HHhp8sVYQyLLJRJB2rw=; b=rR1gO1tzuQG5SIpld+EhQzGtZbx8NYTD17OgNatIHcI5AhSNPn91i0Vz9yQhynbDeh COrpXWM08z0RsmItqZh7GDE+urWjx3dNLJJKj5fFj4KgCAxHw1xMoWuKyFmwv7j7nfpS ftPaAogBO48Qya9ThGvoQYpZkFQ8aaA8bu2IXE0HytaYPXCbQ+TO1268ISln50ZRItkx QWo0QmwSDT7IGGO/BMd5qZOiQUy7VFp8nP+P8Uff8MkTXE/L16riAzLVYlYUcoNVGBai 9Yycyw7XSUEcffkbrljaQmD3xSgvckPAB7avJFtaAfsJOmRyE7H5gTEiYE2wBs46UNMf CiYA== X-Gm-Message-State: AOAM53002DQ8Ld4ZDvxygYU9L+GbMPHzZWKHhyHFHWVkH4qj/u1sBSv+ 3W2YwezADSKGuKlOCXHugpgqw5nF X-Google-Smtp-Source: ABdhPJw/OmIf8E7xE1H2r9YBtKBTsSKljkQDJrjgvZOABydwNNyNatcEgxs/SUnAqkto7Z2yAqbnnw== X-Received: by 2002:a1c:1d44:: with SMTP id d65mr2747380wmd.179.1591789227763; Wed, 10 Jun 2020 04:40:27 -0700 (PDT) Original-Received: from rpluim-mac (vav06-1-78-207-202-134.fbx.proxad.net. [78.207.202.134]) by smtp.gmail.com with ESMTPSA id t129sm7196192wmf.41.2020.06.10.04.40.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Jun 2020 04:40:26 -0700 (PDT) Gmane-Reply-To-List: yes In-Reply-To: (=?utf-8?Q?=22Micha=C5=82?= Nazarewicz"'s message of "Wed, 10 Jun 2020 12:35:19 +0100") Received-SPF: pass client-ip=2a00:1450:4864:20::32c; envelope-from=rpluim@gmail.com; helo=mail-wm1-x32c.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-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:252069 Archived-At: >>>>> On Wed, 10 Jun 2020 12:35:19 +0100, Micha=C5=82 Nazarewicz said: Micha=C5=82> On Tue, 9 Jun 2020 at 21:13, Alan Mackenzie w= rote: >> On Sun, Jun 07, 2020 at 19:07:12 +0100, Micha=C5=82 Nazarewicz wrote: >> > On Sun, 7 Jun 2020 at 17:41, Alan Mackenzie wrote: >> > > In c-or-c++-mode--regexp, there are several occurrences of >>=20 >> > > [ \t\r] >>=20 >> > > . These expressions notably lack \n. This seems strange, given= how \n >> > > is the normal line terminator in Emacs and \r is a rarely used a= rtefact. >>=20 >> > I wanted the regex to match single-line rather than multi-line sta= tements >> > to avoid false positives. Though, other than #include lines, eithe= r will >> > probably work equally well. >>=20 >> I don't fully understand. Why have you got the \r there? Micha=C5=82> I suppose you=E2=80=99re right. It should be [ \t\v\f] ins= tead to catch Micha=C5=82> all non-new-line white-space characters. Or [ \t\v\f\r\n] = to catch Micha=C5=82> all white-space characters. [[:blank:]] ? Robert