From 5cc59a37897852e81e69dc630396785bddab03dd Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Mon, 6 Feb 2012 23:08:41 +0100 Subject: [PATCH] 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. --- lisp/ChangeLog | 8 ++++++++ lisp/progmodes/cc-mode.el | 3 ++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 46849087958..2f21d9e046e 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,11 @@ +2012-02-06 Lars Ingebrigtsen + + * 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 * simple.el (list-processes--refresh): Delete exited processes 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) -- 2.39.2