aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlan Mackenzie2019-04-27 17:17:10 +0000
committerAlan Mackenzie2019-04-27 17:17:10 +0000
commitdbe81e16583adcae664871206694573209540286 (patch)
tree09cb770ae891e1be58ddcc4d05164181f14c345f
parent8dc00b2f1e6523c634df3e24379afbe712a32b27 (diff)
downloademacs-dbe81e16583adcae664871206694573209540286.tar.gz
emacs-dbe81e16583adcae664871206694573209540286.zip
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.
-rw-r--r--lisp/progmodes/cc-engine.el4
1 files changed, 3 insertions, 1 deletions
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."
5529 (prog1 (looking-at "\\s(") 5529 (prog1 (looking-at "\\s(")
5530 (forward-char)))) 5530 (forward-char))))
5531 (backward-char) 5531 (backward-char)
5532 (if (c-forward-<>-arglist nil) ; Should always work. 5532 (if (let ((c-parse-and-markup-<>-arglists t)
5533 (c-restricted-<>-arglists t))
5534 (c-forward-<>-arglist nil)) ; Should always work.
5533 (when (> (point) to) 5535 (when (> (point) to)
5534 (setq bound-<> (point))) 5536 (setq bound-<> (point)))
5535 (forward-char))) 5537 (forward-char)))