GNU bug report logs - #64069
30.0.50; Mistyped shy group regexps

Previous Next

Package: emacs;

Reported by: Basil Contovounesios <contovob <at> tcd.ie>

Date: Wed, 14 Jun 2023 16:44:02 UTC

Severity: minor

Tags: patch

Found in version 30.0.50

Fixed in version 30.1

Done: Basil Contovounesios <contovob <at> tcd.ie>

Bug is archived. No further changes may be made.

Full log


Message #17 received at 64069 <at> debbugs.gnu.org (full text, mbox):

From: Alan Mackenzie <acm <at> muc.de>
To: Basil Contovounesios <contovob <at> tcd.ie>
Cc: Dmitry Gutov <dmitry <at> gutov.dev>,
 Mattias EngdegÄrd <mattias.engdegard <at> gmail.com>,
 Paul Eggert <eggert <at> cs.ucla.edu>, 64069 <at> debbugs.gnu.org
Subject: Re: bug#64069: 30.0.50; Mistyped shy group regexps
Date: Thu, 15 Jun 2023 20:58:38 +0000
Hello, Basil.

On Wed, Jun 14, 2023 at 17:43:39 +0100, Basil Contovounesios wrote:
> Severity: minor
> Tags: patch

> Further to https://bugs.gnu.org/64019#14, I attach a patch which tweaks
> four redundant or seemingly mistyped instances of \(:?...\), i.e. a
> numbered group starting with an optional colon in place of the likelier
> shy group.

> CCing:
> - Alan to review the change to c-or-c++-mode--regexp

Yes, that looks like a bug, just as you've surmised.

There are also three other occurrences of \(:? in CC Mode, namely in
cc-langs.el.

I will fix all of these in master.

[ .... ]

> diff --git a/lisp/progmodes/cc-mode.el b/lisp/progmodes/cc-mode.el
> index 11a1d3fe6c2..5cf9b7e17f8 100644
> --- a/lisp/progmodes/cc-mode.el
> +++ b/lisp/progmodes/cc-mode.el
> @@ -2859,7 +2859,7 @@ c-or-c++-mode--regexp
>                                       "\\|" id "::"
>                                       "\\|" id ws-maybe "=\\)"
>                "\\|" "\\(?:inline" ws "\\)?namespace"
> -                    "\\(:?" ws "\\(?:" id "::\\)*" id "\\)?" ws-maybe "{"
> +                    "\\(?:" ws "\\(?:" id "::\\)*" id "\\)?" ws-maybe "{"
>                "\\|" "class"     ws id
>                      "\\(?:" ws "final" "\\)?" ws-maybe "[:{;\n]"
>                "\\|" "struct"     ws id "\\(?:" ws "final" ws-maybe "[:{\n]"

[ .... ]

-- 
Alan Mackenzie (Nuremberg, Germany).




This bug report was last modified 2 years and 25 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.