aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/progmodes/cc-langs.el
diff options
context:
space:
mode:
authorAlan Mackenzie <[email protected]>2009-02-21 16:10:39 +0000
committerAlan Mackenzie <[email protected]>2009-02-21 16:10:39 +0000
commitd28e7f288e4abb47c3143d5fd936f5ea440c3d96 (patch)
tree27689676e8f9faeff5728ec2e997f7e049efc529 /lisp/progmodes/cc-langs.el
parent90005fd6f3fd5188e6a6de90474bed6fa1f56a5a (diff)
cc-engine.el (c-beginning-of-statement-1): Enhance to parse case clauses
with (compile-time) expressions. cc-langs.el (c-case-kwds-regexp): New variable for the above.
Diffstat (limited to 'lisp/progmodes/cc-langs.el')
-rw-r--r--lisp/progmodes/cc-langs.el11
1 files changed, 11 insertions, 0 deletions
diff --git a/lisp/progmodes/cc-langs.el b/lisp/progmodes/cc-langs.el
index fc3dfde58e..1a4fba2c8a 100644
--- a/lisp/progmodes/cc-langs.el
+++ b/lisp/progmodes/cc-langs.el
@@ -2115,6 +2115,17 @@ nevertheless contains a list separated with ';' and not ','."
(c-make-keywords-re t (c-lang-const c-asm-stmt-kwds))))
(c-lang-defvar c-opt-asm-stmt-key (c-lang-const c-opt-asm-stmt-key))
+(c-lang-defconst c-case-kwds
+ "The keyword\(s) which introduce a \"case\" like construct.
+This construct is \"<keyword> <expression> :\"."
+ t '("case")
+ awk nil)
+
+(c-lang-defconst c-case-kwds-regexp
+ ;; Adorned regexp matching any "case"-like keyword.
+ t (c-make-keywords-re t (c-lang-const c-case-kwds)))
+(c-lang-defvar c-case-kwds-regexp (c-lang-const c-case-kwds-regexp))
+
(c-lang-defconst c-label-kwds
"Keywords introducing colon terminated labels in blocks."
t '("case" "default")