]> git.eshelyaron.com Git - emacs.git/commitdiff
Analyze and fontify correctly a C++ `enum' with colon, but lacking a tag.
authorAlan Mackenzie <acm@muc.de>
Wed, 24 Aug 2016 01:18:20 +0000 (01:18 +0000)
committerAlan Mackenzie <acm@muc.de>
Wed, 24 Aug 2016 01:18:20 +0000 (01:18 +0000)
* lisp/progmodes/cc-engine.el (c-backward-typed-enum-colon): Check for "enum"
directly preceding the colon, and handle it.

lisp/progmodes/cc-engine.el

index ccdc1b15a6823a0ab4cfa287b3d1638b81d2248c..940d7a4cc3e915eed60fe4fcfdc722fc69356893 100644 (file)
@@ -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)