From dbe81e16583adcae664871206694573209540286 Mon Sep 17 00:00:00 2001 From: Alan Mackenzie Date: Sat, 27 Apr 2019 17:17:10 +0000 Subject: [PATCH] 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. --- lisp/progmodes/cc-engine.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el index 242954dbf25..5d1b4bbed6e 100644 --- a/lisp/progmodes/cc-engine.el +++ b/lisp/progmodes/cc-engine.el @@ -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))) -- 2.39.5