aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlan Mackenzie2016-08-24 01:18:20 +0000
committerAlan Mackenzie2016-08-24 01:18:20 +0000
commit799a8a3338389013e8a76a70f507664ccb09a14f (patch)
tree302fe1b0c3192380d1518475c614afe1137294f2
parent90d258c51eae1f47db8fe630fccb4e98b7a3187a (diff)
downloademacs-799a8a3338389013e8a76a70f507664ccb09a14f.tar.gz
emacs-799a8a3338389013e8a76a70f507664ccb09a14f.zip
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.el5
1 files changed, 4 insertions, 1 deletions
diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el
index ccdc1b15a68..940d7a4cc3e 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."
9756 ((and (eql (char-after) ?:) 9756 ((and (eql (char-after) ?:)
9757 (save-excursion 9757 (save-excursion
9758 (c-backward-syntactic-ws) 9758 (c-backward-syntactic-ws)
9759 (c-on-identifier))) 9759 (or (c-on-identifier)
9760 (progn
9761 (c-backward-token-2)
9762 (looking-at c-brace-list-key)))))
9760 (setq colon-pos (point)) 9763 (setq colon-pos (point))
9761 (forward-char) 9764 (forward-char)
9762 (c-forward-syntactic-ws) 9765 (c-forward-syntactic-ws)