From: Alan Mackenzie Date: Sat, 2 Nov 2019 13:03:50 +0000 (+0000) Subject: CC Mode. Fix slow scrolling by adding a search limit. X-Git-Tag: emacs-27.0.90~765 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=ec16dd1a1e0cc4c315fb57f8720083aabfd434e5;p=emacs.git CC Mode. Fix slow scrolling by adding a search limit. This fixes bug #10149. * lisp/progmodes/cc-fonts.el (c-font-lock-single-decl) Limit the search by c-go-up-list-backwards to 500 non-literal characters. --- diff --git a/lisp/progmodes/cc-fonts.el b/lisp/progmodes/cc-fonts.el index f58caf2f1ae..c27b70603ed 100644 --- a/lisp/progmodes/cc-fonts.el +++ b/lisp/progmodes/cc-fonts.el @@ -1244,7 +1244,7 @@ casts and declarations are fontified. Used on level 2 and higher." (if (save-excursion (and (car (cddr decl-or-cast)) ; maybe-expression flag. - (c-go-up-list-backward) + (c-go-up-list-backward nil (c-determine-limit 500)) (eq (char-after) ?\() (progn (c-backward-syntactic-ws) (c-simple-skip-symbol-backward))