]> code.delx.au - gnu-emacs/blobdiff - lisp/progmodes/cc-fonts.el
Merge from emacs-24; up to 117687
[gnu-emacs] / lisp / progmodes / cc-fonts.el
index 1c389bc36656fc3c55a874b4d662bf23a6e536db..8035c1891d774a3819d113634750534b0793a35d 100644 (file)
@@ -1255,6 +1255,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
@@ -1487,7 +1489,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 decltype))
                            (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)