;; Put on the brace which introduces a brace list and on the commas
;; which separate the elements within it.
;;
+;; 'c-<>-c-types-set
+;; This property is set on an opening angle bracket, and indicates that
+;; any "," separators within the template/generic expression have been
+;; marked with a 'c-type property value 'c-<>-arg-sep (see above).
+;;
;; 'c-awk-NL-prop
;; Used in AWK mode to mark the various kinds of newlines. See
;; cc-awk.el.
(forward-char))))
(backward-char)
(if (let ((c-parse-and-markup-<>-arglists t)
- (c-restricted-<>-arglists t))
+ c-restricted-<>-arglists)
(c-forward-<>-arglist nil)) ; Should always work.
(when (> (point) to)
(setq bound-<> (point)))
arg-start-pos)
;; If the '<' has paren open syntax then we've marked it as an angle
;; bracket arglist before, so skip to the end.
- (if (and (not c-parse-and-markup-<>-arglists)
- syntax-table-prop-on-<)
-
+ (if (and syntax-table-prop-on-<
+ (or (not c-parse-and-markup-<>-arglists)
+ (c-get-char-property (point) 'c-<>-c-types-set)))
(progn
(forward-char)
(if (and (c-go-up-list-forward)
(c-unmark-<->-as-paren (point)))))
(c-mark-<-as-paren start)
(c-mark->-as-paren (1- (point)))
+ (c-put-char-property start 'c-<>-c-types-set t)
(c-truncate-lit-pos-cache start))
(setq res t)
nil)) ; Exit the loop.
(save-excursion
(let ((pos (point)))
(c-backward-syntactic-ws (max (- (point) 500) (point-min)))
- (c-clear-char-properties
- (if (and (not (bobp))
- (memq (c-get-char-property (1- (point)) 'c-type)
- '(c-decl-arg-start
- c-decl-end
- c-decl-id-start
- c-decl-type-start
- c-not-decl)))
- (1- (point))
- pos)
- limit 'c-type)))
+ (when (and (not (bobp))
+ (memq (c-get-char-property (1- (point)) 'c-type)
+ '(c-decl-arg-start
+ c-decl-end
+ c-decl-id-start
+ c-decl-type-start
+ c-not-decl)))
+ (setq pos (1- (point))))
+ (c-clear-char-properties pos limit 'c-type)
+ (c-clear-char-properties pos limit 'c-<>-c-types-set)))
;; Update `c-state-cache' to the beginning of the region. This will
;; make `c-beginning-of-syntax' go faster when it's used later on,