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.
This commit is contained in:
parent
6dabbddb5f
commit
142babb9bd
1 changed files with 1 additions and 3 deletions
|
@ -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))
|
||||
|
|
Loading…
Add table
Reference in a new issue