aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlan Mackenzie2011-11-03 22:14:11 +0000
committerAlan Mackenzie2011-11-03 22:14:11 +0000
commit9996e0ee1bfb330ca7e6d1b725088717a6d7e9c8 (patch)
tree2cf3d45f2f0af405bdccddaecc20f0b32ed27936
parent9d217cacde63035bb1836a0fcb816cf4834b29b0 (diff)
parentbd17fdeeea1446e098cde7e33e1eea60928c4e53 (diff)
downloademacs-9996e0ee1bfb330ca7e6d1b725088717a6d7e9c8.tar.gz
emacs-9996e0ee1bfb330ca7e6d1b725088717a6d7e9c8.zip
Add c-nonlabel-token-2-key to cc-langs.el.
-rw-r--r--lisp/ChangeLog6
-rw-r--r--lisp/progmodes/cc-langs.el8
2 files changed, 13 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index a94987284de..6352a65e4fc 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12011-11-03 Alan Mackenzie <acm@muc.de>
2
3 * progmodes/cc-langs.el (c-nonlabel-token-2-key): New variable for
4 change in cc-engine.el.
5
12011-11-02 Stefan Monnier <monnier@iro.umontreal.ca> 62011-11-02 Stefan Monnier <monnier@iro.umontreal.ca>
2 7
3 * window.el (switch-to-buffer): Use `force-same-window' interactively. 8 * window.el (switch-to-buffer): Use `force-same-window' interactively.
@@ -136,7 +141,6 @@
136 141
137 * progmodes/cc-langs.el (c-defun-tactic): Move this variable to 142 * progmodes/cc-langs.el (c-defun-tactic): Move this variable to
138 cc-vars.el. 143 cc-vars.el.
139 (c-nonlabel-token-2-key): New variable for change in cc-engine.el.
140 144
141 * progmodes/cc-engine.el (c-beginning-of-statement-1): 145 * progmodes/cc-engine.el (c-beginning-of-statement-1):
142 Prevent "class foo : bar" being spuriously recognized as a label. 146 Prevent "class foo : bar" being spuriously recognized as a label.
diff --git a/lisp/progmodes/cc-langs.el b/lisp/progmodes/cc-langs.el
index 09f8b318378..e1fb69c30c8 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."
3012 c++ (concat "\\s\(\\|" (c-lang-const c-nonlabel-token-key))) 3012 c++ (concat "\\s\(\\|" (c-lang-const c-nonlabel-token-key)))
3013(c-lang-defvar c-nonlabel-token-key (c-lang-const c-nonlabel-token-key)) 3013(c-lang-defvar c-nonlabel-token-key (c-lang-const c-nonlabel-token-key))
3014 3014
3015(c-lang-defconst c-nonlabel-token-2-key
3016 "Regexp matching things that can't occur two symbols before a colon in
3017a label construct. This catches C++'s inheritance construct \"class foo
3018: bar\". Only used if `c-recognize-colon-labels' is set."
3019 t "\\<\\>" ; matches nothing
3020 c++ (c-make-keywords-re t '("class")))
3021(c-lang-defvar c-nonlabel-token-2-key (c-lang-const c-nonlabel-token-2-key))
3022
3015(c-lang-defconst c-opt-extra-label-key 3023(c-lang-defconst c-opt-extra-label-key
3016 "Optional regexp matching labels. 3024 "Optional regexp matching labels.
3017Normally, labels are detected according to `c-nonlabel-token-key', 3025Normally, labels are detected according to `c-nonlabel-token-key',