summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorAlan Mackenzie <acm@muc.de>2015-08-10 16:54:35 +0000
committerAlan Mackenzie <acm@muc.de>2015-08-10 16:54:35 +0000
commit092e0a0c51a1d71236f28ec186963f1ab24f8efb (patch)
tree72e61fb4f7a403d589b5de2bb020a63344d26165 /lisp
parenta9bb9d8fc22417d1fafd8001d89a91c33c8b39ec (diff)
downloademacs-092e0a0c51a1d71236f28ec186963f1ab24f8efb.tar.gz
emacs-092e0a0c51a1d71236f28ec186963f1ab24f8efb.tar.bz2
emacs-092e0a0c51a1d71236f28ec186963f1ab24f8efb.zip
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.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/progmodes/cc-fonts.el1
1 files changed, 1 insertions, 0 deletions
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).