Commit ceb7a7df authored by Alan Mackenzie's avatar Alan Mackenzie
Browse files

Fix wrong bound to c-font-lock-declarators. Fixes bug #18948.

progmodes/cc-fonts.el (c-font-lock-declarations): Pass "(point-max)" as
bound to c-font-lock-declarators, not "limit", as the buffer is sometimes
narrowed to less than "limit" (e.g., in the presence of macros).
parent bd02f3d4
2014-11-05 Alan Mackenzie <acm@muc.de>
Fix wrong bound to c-font-lock-declarators. Fixes bug #18948.
* progmodes/cc-fonts.el (c-font-lock-declarations): Pass
"(point-max)" as bound to c-font-lock-declarators, not "limit", as
the buffer is sometimes narrowed to less than "limit" (e.g., in
the presence of macros).
2014-11-05 Michael Albinus <michael.albinus@gmx.de>
* net/tramp.el (tramp-error-with-buffer): Show connection buffer
......
......@@ -1279,6 +1279,8 @@ casts and declarations are fontified. Used on level 2 and higher."
c-font-lock-maybe-decl-faces
(lambda (match-pos inside-macro)
;; Note to maintainers: don't use `limit' inside this lambda form;
;; c-find-decl-spots sometimes narrows to less than `limit'.
(setq start-pos (point))
(when
;; The result of the form below is true when we don't recognize a
......@@ -1507,7 +1509,7 @@ casts and declarations are fontified. Used on level 2 and higher."
;; At a real declaration?
(if (memq (c-forward-type t) '(t known found))
(progn
(c-font-lock-declarators limit t is-typedef)
(c-font-lock-declarators (point-max) t is-typedef)
nil)
;; False alarm. Return t to go on to the next check.
(goto-char start-pos)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment