Allow calling C fontification while rendering MIME parts
authorLars Ingebrigtsen <larsi@gnus.org>
Mon, 6 Feb 2012 22:08:41 +0000 (23:08 +0100)
committerLars Ingebrigtsen <larsi@gnus.org>
Mon, 6 Feb 2012 22:08:41 +0000 (23:08 +0100)
* progmodes/cc-mode.el
(c-standard-font-lock-fontify-region-function): Set the default at
load time, too, so that `font-lock-fontify-buffer' can be called
without setting up the entire mode first.  This fixes a bug in
`mm-inline-text' with C MIME parts.

lisp/ChangeLog
lisp/progmodes/cc-mode.el

index 4684908..2f21d9e 100644 (file)
@@ -1,3 +1,11 @@
+2012-02-06  Lars Ingebrigtsen  <larsi@gnus.org>
+
+       * progmodes/cc-mode.el
+       (c-standard-font-lock-fontify-region-function): Set the default at
+       load time, too, so that `font-lock-fontify-buffer' can be called
+       without setting up the entire mode first.  This fixes a bug in
+       `mm-inline-text' with C MIME parts.
+
 2012-02-06  Chong Yidong  <cyd@gnu.org>
 
        * simple.el (list-processes--refresh): Delete exited processes
index 0c86b68..374c9b4 100644 (file)
@@ -1155,7 +1155,8 @@ Note that the style variables are always made local to the buffer."
   ;; `c-set-fl-decl-start' for the detailed functionality.
   (cons (c-set-fl-decl-start beg) end))
 
-(defvar c-standard-font-lock-fontify-region-function nil
+(defvar c-standard-font-lock-fontify-region-function
+  (default-value 'font-lock-fontify-region-function)
   "Standard value of `font-lock-fontify-region-function'")
 
 (defun c-font-lock-fontify-region (beg end &optional verbose)