Fix slow scrolling in C++ buffers with lots of template delimiters.

* lisp/progmodes/cc-engine.el (c-update-brace-stack): bind
c-parse-and-markup-<>-arglists and c-restricted-<>-arglists to t around the
call to c-forward-<>-arglist, to force the marking of template delimiters with
syntax-table text properties.
This commit is contained in:
Alan Mackenzie 2019-04-27 17:17:10 +00:00
parent 8dc00b2f1e
commit dbe81e1658

View file

@ -5529,7 +5529,9 @@ comment at the start of cc-engine.el for more info."
(prog1 (looking-at "\\s(")
(forward-char))))
(backward-char)
(if (c-forward-<>-arglist nil) ; Should always work.
(if (let ((c-parse-and-markup-<>-arglists t)
(c-restricted-<>-arglists t))
(c-forward-<>-arglist nil)) ; Should always work.
(when (> (point) to)
(setq bound-<> (point)))
(forward-char)))