From 092e0a0c51a1d71236f28ec186963f1ab24f8efb Mon Sep 17 00:00:00 2001 From: Alan Mackenzie Date: Mon, 10 Aug 2015 16:54:35 +0000 Subject: [PATCH] Fix "Invalid search bound (wrong side of point)" in fontification. progmodes/cc-fonts.el (c-font-lock-declarators): After skipping an initialization expression, check point is not beyond the fontification limit. --- lisp/progmodes/cc-fonts.el | 1 + 1 file changed, 1 insertion(+) diff --git a/lisp/progmodes/cc-fonts.el b/lisp/progmodes/cc-fonts.el index ad564f7c3df..0f9b2d3c9c1 100644 --- a/lisp/progmodes/cc-fonts.el +++ b/lisp/progmodes/cc-fonts.el @@ -1140,6 +1140,7 @@ casts and declarations are fontified. Used on level 2 and higher." (looking-at "{")) (c-safe (c-forward-sexp) t) ; over { .... } t) + (< (point) limit) ;; FIXME: Should look for c-decl-end markers here; ;; we might go far into the following declarations ;; in e.g. ObjC mode (see e.g. methods-4.m). -- 2.39.5