Commit 9996e0ee authored by Alan Mackenzie's avatar Alan Mackenzie
Browse files

Add c-nonlabel-token-2-key to cc-langs.el.

parents 9d217cac bd17fdee
2011-11-03 Alan Mackenzie <acm@muc.de>
* progmodes/cc-langs.el (c-nonlabel-token-2-key): New variable for
change in cc-engine.el.
2011-11-02 Stefan Monnier <monnier@iro.umontreal.ca>
* window.el (switch-to-buffer): Use `force-same-window' interactively.
......@@ -136,7 +141,6 @@
* progmodes/cc-langs.el (c-defun-tactic): Move this variable to
cc-vars.el.
(c-nonlabel-token-2-key): New variable for change in cc-engine.el.
* progmodes/cc-engine.el (c-beginning-of-statement-1):
Prevent "class foo : bar" being spuriously recognized as a label.
......
......@@ -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',
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment