emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master 799a8a3: Analyze and fontify correctly a C++ `enum'


From: Alan Mackenzie
Subject: [Emacs-diffs] master 799a8a3: Analyze and fontify correctly a C++ `enum' with colon, but lacking a tag.
Date: Wed, 24 Aug 2016 01:21:53 +0000 (UTC)

branch: master
commit 799a8a3338389013e8a76a70f507664ccb09a14f
Author: Alan Mackenzie <address@hidden>
Commit: Alan Mackenzie <address@hidden>

    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.
---
 lisp/progmodes/cc-engine.el |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el
index ccdc1b1..940d7a4 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)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]