]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix slow scrolling in C++ buffers with lots of template delimiters.
authorAlan Mackenzie <acm@muc.de>
Sat, 27 Apr 2019 17:17:10 +0000 (17:17 +0000)
committerAlan Mackenzie <acm@muc.de>
Sat, 27 Apr 2019 17:17:10 +0000 (17:17 +0000)
* 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

index 242954dbf25b7203e69f854788e42c9ae5686f86..5d1b4bbed6eeeff86a4cb878812bbbd878811f2b 100644 (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)))