The error happened when there was a comma inside template delimiters.
* lisp/progmodes/cc-fonts.el (c-get-fontification-context): In "for"
statements, recognise template delimiters containing "," and "&".
(goto-char match-pos)
(backward-char)
(c-backward-token-2)
- (or (looking-at c-block-stmt-2-key)
- (looking-at c-block-stmt-1-2-key)
- (looking-at c-typeof-key))))
- (cons nil t))
+ (cond
+ ((looking-at c-paren-stmt-key)
+ ;; Allow comma separated <> arglists in for statements.
+ (cons nil nil))
+ ((or (looking-at c-block-stmt-2-key)
+ (looking-at c-block-stmt-1-2-key)
+ (looking-at c-typeof-key))
+ (cons nil t))
+ (t nil)))))
;; Near BOB.
((<= match-pos (point-min))
(cons 'arglist t))