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 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
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
;; 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)