]> git.eshelyaron.com Git - emacs.git/commitdiff
CC Mode: Remove search limit to fontify first decl in xdisp.c
authorAlan Mackenzie <acm@muc.de>
Sat, 5 Oct 2024 17:28:28 +0000 (17:28 +0000)
committerEshel Yaron <me@eshelyaron.com>
Sun, 6 Oct 2024 07:01:34 +0000 (09:01 +0200)
An unneeded 10,000 character search limit prevents the full
fontification of the first declaration of xdisp.c, since the
introductory commentary is longer than that.

* lisp/progmodes/cc-engine (c-find-decl-spots): Remove the
10,000 char limit.

(cherry picked from commit 4c7a6dc1a0ce8fe7bb603c907efb52d2ecf30858)

lisp/progmodes/cc-engine.el

index 0f42a905706c8f5fd982076fe2764a86ab2abfe5..0898f28b880b877b3212acf8f51ee6022933a15d 100644 (file)
@@ -6578,8 +6578,7 @@ comment at the start of cc-engine.el for more info."
          ;; we're just some syntactic whitespace further down we can
          ;; still use the cache to limit the skipping.
          (c-backward-syntactic-ws
-          (max (or c-find-decl-syntactic-pos (point-min))
-               (- (point) 10000) (point-min))))
+          (max (or c-find-decl-syntactic-pos (point-min)) (point-min))))
 
        ;; If we hit `c-find-decl-syntactic-pos' and
        ;; `c-find-decl-match-pos' is set then we install the cached