Commit 223429c0 authored by Alan Mackenzie's avatar Alan Mackenzie

Handle template delimiters in C++ member init constructs.

* lisp/progmodes/cc-engine.el (c-back-over-list-of-member-inits): Add
handling for "<....>"s.
parent 1c7166a3
...@@ -7410,7 +7410,8 @@ comment at the start of cc-engine.el for more info." ...@@ -7410,7 +7410,8 @@ comment at the start of cc-engine.el for more info."
(defmacro c-back-over-list-of-member-inits () (defmacro c-back-over-list-of-member-inits ()
;; Go back over a list of elements, each looking like: ;; Go back over a list of elements, each looking like:
;; <symbol> (<expression>) , ;; <symbol> (<expression>) ,
;; or <symbol> {<expression>} , ;; or <symbol> {<expression>} , (with possibly a <....> expressions
;; following the <symbol>).
;; when we are putatively immediately after a comma. Stop when we don't see ;; when we are putatively immediately after a comma. Stop when we don't see
;; a comma. If either of <symbol> or bracketed <expression> is missing, ;; a comma. If either of <symbol> or bracketed <expression> is missing,
;; throw nil to 'level. If the terminating } or ) is unmatched, throw nil ;; throw nil to 'level. If the terminating } or ) is unmatched, throw nil
...@@ -7423,6 +7424,11 @@ comment at the start of cc-engine.el for more info." ...@@ -7423,6 +7424,11 @@ comment at the start of cc-engine.el for more info."
(when (not (c-go-list-backward)) (when (not (c-go-list-backward))
(throw 'done nil)) (throw 'done nil))
(c-backward-syntactic-ws) (c-backward-syntactic-ws)
(while (eq (char-before) ?>)
(when (not (c-backward-<>-arglist nil))
(throw 'done nil))
(c-backward-syntactic-ws))
(c-backward-syntactic-ws)
(when (not (c-back-over-compound-identifier)) (when (not (c-back-over-compound-identifier))
(throw 'level nil)) (throw 'level nil))
(c-backward-syntactic-ws))) (c-backward-syntactic-ws)))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment