diff options
author | Alan Mackenzie <acm@muc.de> | 2016-08-24 01:18:20 +0000 |
---|---|---|
committer | Alan Mackenzie <acm@muc.de> | 2016-08-24 01:18:20 +0000 |
commit | 799a8a3338389013e8a76a70f507664ccb09a14f (patch) | |
tree | 302fe1b0c3192380d1518475c614afe1137294f2 | |
parent | 90d258c51eae1f47db8fe630fccb4e98b7a3187a (diff) |
Analyze and fontify correctly a C++ `enum' with colon, but lacking a tag.
* lisp/progmodes/cc-engine.el (c-backward-typed-enum-colon): Check for "enum"
directly preceding the colon, and handle it.
-rw-r--r-- | lisp/progmodes/cc-engine.el | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el index ccdc1b15a6..940d7a4cc3 100644 --- a/lisp/progmodes/cc-engine.el +++ b/lisp/progmodes/cc-engine.el @@ -9756,7 +9756,10 @@ comment at the start of cc-engine.el for more info." ((and (eql (char-after) ?:) (save-excursion (c-backward-syntactic-ws) - (c-on-identifier))) + (or (c-on-identifier) + (progn + (c-backward-token-2) + (looking-at c-brace-list-key))))) (setq colon-pos (point)) (forward-char) (c-forward-syntactic-ws) |