From: Alan Mackenzie Date: Sat, 27 Aug 2016 15:45:17 +0000 (+0000) Subject: Handle template delimiters in C++ member init constructs. X-Git-Tag: emacs-26.0.90~1689 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=223429c09bb457f686693a6280339a4888bbad1c;p=emacs.git Handle template delimiters in C++ member init constructs. * lisp/progmodes/cc-engine.el (c-back-over-list-of-member-inits): Add handling for "<....>"s. --- diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el index 940d7a4cc3e..ecee57e4016 100644 --- a/lisp/progmodes/cc-engine.el +++ b/lisp/progmodes/cc-engine.el @@ -7410,7 +7410,8 @@ comment at the start of cc-engine.el for more info." (defmacro c-back-over-list-of-member-inits () ;; Go back over a list of elements, each looking like: ;; () , - ;; or {} , + ;; or {} , (with possibly a <....> expressions + ;; following the ). ;; when we are putatively immediately after a comma. Stop when we don't see ;; a comma. If either of or bracketed is missing, ;; 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." (when (not (c-go-list-backward)) (throw 'done nil)) (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)) (throw 'level nil)) (c-backward-syntactic-ws)))