]> code.delx.au - gnu-emacs/commitdiff
Add c-nonlabel-token-2-key to cc-langs.el.
authorAlan Mackenzie <acm@muc.de>
Thu, 3 Nov 2011 21:55:15 +0000 (21:55 +0000)
committerAlan Mackenzie <acm@muc.de>
Thu, 3 Nov 2011 21:55:15 +0000 (21:55 +0000)
lisp/progmodes/cc-langs.el

index 09f8b318378fcffe358a51fb88fcc01f36e44677..e1fb69c30c8a1196f23a2b2f1a4adf41303beaf3 100644 (file)
@@ -3012,6 +3012,14 @@ i.e. before \":\".  Only used if `c-recognize-colon-labels' is set."
   c++ (concat "\\s\(\\|" (c-lang-const c-nonlabel-token-key)))
 (c-lang-defvar c-nonlabel-token-key (c-lang-const c-nonlabel-token-key))
 
+(c-lang-defconst c-nonlabel-token-2-key
+  "Regexp matching things that can't occur two symbols before a colon in
+a label construct.  This catches C++'s inheritance construct \"class foo
+: bar\".  Only used if `c-recognize-colon-labels' is set."
+  t "\\<\\>"                           ; matches nothing
+  c++ (c-make-keywords-re t '("class")))
+(c-lang-defvar c-nonlabel-token-2-key (c-lang-const c-nonlabel-token-2-key))
+
 (c-lang-defconst c-opt-extra-label-key
   "Optional regexp matching labels.
 Normally, labels are detected according to `c-nonlabel-token-key',