[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 142babb: CC Mode: Get proper search limits in c-font-lock-cut-off
From: |
Alan Mackenzie |
Subject: |
master 142babb: CC Mode: Get proper search limits in c-font-lock-cut-off-declarators |
Date: |
Sun, 25 Apr 2021 13:42:52 -0400 (EDT) |
branch: master
commit 142babb9bd8585136d4d56fb8b6dc2761d891c79
Author: Alan Mackenzie <acm@muc.de>
Commit: Alan Mackenzie <acm@muc.de>
CC Mode: Get proper search limits in c-font-lock-cut-off-declarators
* lisp/progmodes/cc-fonts.el (c-font-lock-cut-off-declarators): Instead of
using a crude 2,000 characters back limit for backward searching, which is
erroneous when that point is in a literal, use the already calculated
c-determine-limit result.
---
lisp/progmodes/cc-fonts.el | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/lisp/progmodes/cc-fonts.el b/lisp/progmodes/cc-fonts.el
index fdef084..a7c8712 100644
--- a/lisp/progmodes/cc-fonts.el
+++ b/lisp/progmodes/cc-fonts.el
@@ -1669,9 +1669,7 @@ casts and declarations are fontified. Used on level 2
and higher."
c-recognize-knr-p) ; Strictly speaking, bogus, but it
; speeds up lisp.h tremendously.
(save-excursion
- (when (not (c-back-over-member-initializers
- (max (- (point) 2000) (point-min)))) ; c-determine-limit
- ; is too slow, here.
+ (when (not (c-back-over-member-initializers decl-search-lim))
(unless (or (eobp)
(looking-at "\\s(\\|\\s)"))
(forward-char))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 142babb: CC Mode: Get proper search limits in c-font-lock-cut-off-declarators,
Alan Mackenzie <=