From: Alan Mackenzie Date: Wed, 24 Aug 2016 01:18:20 +0000 (+0000) Subject: Analyze and fontify correctly a C++ `enum' with colon, but lacking a tag. X-Git-Tag: emacs-26.0.90~1700 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=799a8a3338389013e8a76a70f507664ccb09a14f;p=emacs.git 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. --- 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." ((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)