]> git.eshelyaron.com Git - emacs.git/commitdiff
CC Mode: Correct some regexp typos, \\(:? -> \\(?:
authorAlan Mackenzie <acm@muc.de>
Sat, 17 Jun 2023 13:19:18 +0000 (13:19 +0000)
committerAlan Mackenzie <acm@muc.de>
Sat, 17 Jun 2023 13:19:18 +0000 (13:19 +0000)
This partly corrects bug#64069.

* lisp/progmodes/cc-langs.el (c-ml-string-back-closer-re): Fix
four occurrences, one of which was in a comment, one in a doc
string.

* lisp/progmodes/cc-mode.el (c-or-c++-mode--regexp.): Fix one
occurrence.

lisp/progmodes/cc-langs.el
lisp/progmodes/cc-mode.el

index 3b4fdc6e1414a26c598eaa47d59eae94c42681e9..ffb8c5c7b16085a8b44ff3328a46fd32de5f51e3 100644 (file)
@@ -739,11 +739,11 @@ When non-nil, this variable should end in \"\\\\\\==\".  Note that
 such a backward search will match a minimal string, so a
 \"context character\" is probably needed at the start of the
 regexp.  The value for csharp-mode would be something like
-\"\\\\(:?\\\\`\\\\|[^\\\"]\\\\)\\\"*\\\\\\==\"."
+\"\\\\(?:\\\\`\\\\|[^\\\"]\\\\)\\\"*\\\\\\==\"."
   t nil
-  pike "\\(:?\\`\\|[^\\\"]\\)\\(:?\\\\.\\)*\\="
+  pike "\\(?:\\`\\|[^\\\"]\\)\\(?:\\\\.\\)*\\="
   ;;pike ;; 2
-  ;;    "\\(:?\\`\\|[^\"]\\)\"*\\="
+  ;;    "\\(?:\\`\\|[^\"]\\)\"*\\="
   )
 (c-lang-defvar c-ml-string-back-closer-re
               (c-lang-const c-ml-string-back-closer-re))
index 11a1d3fe6c22eedcae3b840a159c156fcfdbd1a6..5cf9b7e17f8c6aa178b59c7ea22761cea7eee50b 100644 (file)
@@ -2859,7 +2859,7 @@ Key bindings:
                                      "\\|" 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]"