From: Alan Mackenzie Date: Sat, 17 Jun 2023 13:19:18 +0000 (+0000) Subject: CC Mode: Correct some regexp typos, \\(:? -> \\(?: X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=f47cf7110edf94b7fb7c7a5ffa97e817f7a0e9d1;p=emacs.git CC Mode: Correct some regexp typos, \\(:? -> \\(?: 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. --- diff --git a/lisp/progmodes/cc-langs.el b/lisp/progmodes/cc-langs.el index 3b4fdc6e141..ffb8c5c7b16 100644 --- a/lisp/progmodes/cc-langs.el +++ b/lisp/progmodes/cc-langs.el @@ -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)) 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 @@ 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]"