summaryrefslogtreecommitdiff
path: root/lisp/progmodes/cc-mode.el
diff options
context:
space:
mode:
authorLars Ingebrigtsen <larsi@gnus.org>2012-02-06 23:08:41 +0100
committerLars Ingebrigtsen <larsi@gnus.org>2012-02-06 23:08:41 +0100
commit5cc59a37897852e81e69dc630396785bddab03dd (patch)
tree363dea2b2fa15bceebc3845723dd3e9b21497a58 /lisp/progmodes/cc-mode.el
parent155628057e1fc9dee052303df2ab7ff1ee5f08a8 (diff)
downloademacs-5cc59a37897852e81e69dc630396785bddab03dd.tar.gz
Allow calling C fontification while rendering MIME parts
* 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.
Diffstat (limited to 'lisp/progmodes/cc-mode.el')
-rw-r--r--lisp/progmodes/cc-mode.el3
1 files changed, 2 insertions, 1 deletions
diff --git a/lisp/progmodes/cc-mode.el b/lisp/progmodes/cc-mode.el
index 0c86b68f1d9..374c9b434d1 100644
--- a/lisp/progmodes/cc-mode.el
+++ b/lisp/progmodes/cc-mode.el
@@ -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)