]> code.delx.au - gnu-emacs/blobdiff - lisp/progmodes/cc-fonts.el
Make typing into incomplete C++ raw strings work, and make it work fast enough
[gnu-emacs] / lisp / progmodes / cc-fonts.el
index 65ec5c3f044e022bde23e03352cd438517d23964..3a8c9ec0ec42c4d56d65c784ab462ae64aaf0ca6 100644 (file)
@@ -1396,7 +1396,7 @@ casts and declarations are fontified.  Used on level 2 and higher."
                                             'c-decl-id-start)))))
 
                (c-font-lock-declarators
-                (point-max) decl-list (cadr decl-or-cast)))
+                (min limit (point-max)) decl-list (cadr decl-or-cast)))
 
              ;; A declaration has been successfully identified, so do all the
              ;; fontification of types and refs that've been recorded.
@@ -1542,7 +1542,7 @@ casts and declarations are fontified.  Used on level 2 and higher."
                (c-forward-syntactic-ws))
              ;; At a real declaration?
              (if (memq (c-forward-type t) '(t known found decltype))
-                 (c-font-lock-declarators (point-max) t is-typedef)))
+                 (c-font-lock-declarators limit t is-typedef)))
          nil)))))
 
 (defun c-font-lock-enclosing-decls (limit)