diff options
author | Alan Mackenzie <[email protected]> | 2011-11-03 22:14:11 +0000 |
---|---|---|
committer | Alan Mackenzie <[email protected]> | 2011-11-03 22:14:11 +0000 |
commit | 9996e0ee1bfb330ca7e6d1b725088717a6d7e9c8 (patch) | |
tree | 2cf3d45f2f0af405bdccddaecc20f0b32ed27936 /lisp | |
parent | 9d217cacde63035bb1836a0fcb816cf4834b29b0 (diff) | |
parent | bd17fdeeea1446e098cde7e33e1eea60928c4e53 (diff) |
Add c-nonlabel-token-2-key to cc-langs.el.
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/ChangeLog | 6 | ||||
-rw-r--r-- | lisp/progmodes/cc-langs.el | 8 |
2 files changed, 13 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a94987284d..6352a65e4f 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2011-11-03 Alan Mackenzie <[email protected]> + + * progmodes/cc-langs.el (c-nonlabel-token-2-key): New variable for + change in cc-engine.el. + 2011-11-02 Stefan Monnier <[email protected]> * 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. 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', |