summaryrefslogtreecommitdiff
path: root/lisp/progmodes/cc-engine.el
diff options
context:
space:
mode:
authorAlan Mackenzie <acm@muc.de>2019-04-13 13:29:58 +0000
committerAlan Mackenzie <acm@muc.de>2019-04-13 13:29:58 +0000
commitf9694a713824d402bcba01064ac2f95156bf4161 (patch)
treedc202523afc5e6d9b191a3e46444d5ce2350b7d5 /lisp/progmodes/cc-engine.el
parentc2c9ef2c1e509f1a01ffaefd7475004854162a10 (diff)
downloademacs-f9694a713824d402bcba01064ac2f95156bf4161.tar.gz
Implement "final" before C++ class inheritance lists.
* lisp/progmodes/cc-langs.el (c-class-id-suffix-ws-ids-kwds) (c-class-id-suffix-ws-ids-key): New lang const/var. * lisp/progmodes/cc-engine.el (c-guess-basic-syntax CASE 5D.4): Check for and skip over any matches for c-class-id-suffix-ws-ids-key (i.e. "final") before ":".
Diffstat (limited to 'lisp/progmodes/cc-engine.el')
-rw-r--r--lisp/progmodes/cc-engine.el7
1 files changed, 7 insertions, 0 deletions
diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el
index fc8c377f277..f0b44d2183d 100644
--- a/lisp/progmodes/cc-engine.el
+++ b/lisp/progmodes/cc-engine.el
@@ -12734,6 +12734,13 @@ comment at the start of cc-engine.el for more info."
(if (eq (char-after) ?<)
(zerop (c-forward-token-2 1 t indent-point))
t)
+ (progn
+ (while
+ (and
+ (< (point) indent-point)
+ (looking-at c-class-id-suffix-ws-ids-key)
+ (zerop (c-forward-token-2 1 nil indent-point))))
+ t)
(eq (char-after) ?:))))
(goto-char placeholder)
(c-add-syntax 'inher-cont (c-point 'boi)))