aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorAlan Mackenzie <[email protected]>2011-11-03 21:55:15 +0000
committerAlan Mackenzie <[email protected]>2011-11-03 21:55:15 +0000
commita6ba2ab9277496b66f6939766a3470c1f0a84287 (patch)
tree6b56335b5682c4596b81e2d571d93de3dc8e9dd5 /lisp
parent7e43cfa5ecbbd8886a334fe97b1bf3f8ea661e52 (diff)
Add c-nonlabel-token-2-key to cc-langs.el.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/progmodes/cc-langs.el8
1 files changed, 8 insertions, 0 deletions
diff --git a/lisp/progmodes/cc-langs.el b/lisp/progmodes/cc-langs.el
index 09f8b31837..e1fb69c30c 100644
--- a/lisp/progmodes/cc-langs.el
+++ b/lisp/progmodes/cc-langs.el
@@ -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',