]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix "Invalid search bound (wrong side of point)" in fontification.
authorAlan Mackenzie <acm@muc.de>
Mon, 10 Aug 2015 16:54:35 +0000 (16:54 +0000)
committerAlan Mackenzie <acm@muc.de>
Mon, 10 Aug 2015 16:54:35 +0000 (16:54 +0000)
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

index ad564f7c3dfee2a2a171aed95255cbf9635c03c9..0f9b2d3c9c16fa5be3aad9ea01db8f33b2f31874 100644 (file)
@@ -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).