emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master ec16dd1: CC Mode. Fix slow scrolling by adding a search limit.


From: Alan Mackenzie
Subject: master ec16dd1: CC Mode. Fix slow scrolling by adding a search limit.
Date: Sat, 2 Nov 2019 09:04:57 -0400 (EDT)

branch: master
commit ec16dd1a1e0cc4c315fb57f8720083aabfd434e5
Author: Alan Mackenzie <address@hidden>
Commit: Alan Mackenzie <address@hidden>

    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.
---
 lisp/progmodes/cc-fonts.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/progmodes/cc-fonts.el b/lisp/progmodes/cc-fonts.el
index f58caf2..c27b706 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))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]