From d3a4c93996054e78aee6675a526dbcf546af5ede Mon Sep 17 00:00:00 2001 From: yamaoka Date: Tue, 6 Sep 2005 05:21:57 +0000 Subject: [PATCH] (mime-view-insert-fontified-text-content): Disable support modes. --- ChangeLog | 5 +++++ mime-view.el | 18 ++++++++++-------- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index ab57c6a..ac7be86 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2005-09-06 Katsumi Yamaoka + + * mm-view.el (mime-view-insert-fontified-text-content): Disable + support modes. + 2005-06-14 Katsumi Yamaoka * mime-view.el (mime-display-text/richtext): Withdraw the last diff --git a/mime-view.el b/mime-view.el index 2955e63..33dc314 100644 --- a/mime-view.el +++ b/mime-view.el @@ -978,20 +978,22 @@ MEDIA-TYPE must be (TYPE . SUBTYPE), TYPE or t. t means default." (kill-all-local-variables) (mime-view-insert-text-content entity situation) (require 'font-lock) - ;; Inhibit font-lock this time (*-mode-hook might run - ;; `turn-on-font-lock') so that jit-lock may not turn off - ;; font-lock immediately after this. - (let ((font-lock-mode t)) + (let ((font-lock-maximum-size nil) + ;; Disable support modes, e.g., jit-lock, lazy-lock, etc. + (font-lock-mode-hook nil) + (font-lock-support-mode nil) + ;; I find font-lock a bit too verbose. + (font-lock-verbose nil)) (cond (mode (funcall mode)) ((setq filename (mime-entity-filename entity)) (let ((buffer-file-name (expand-file-name (file-name-nondirectory filename) temporary-file-directory))) - (set-auto-mode))))) - (let ((font-lock-verbose nil)) - ;; I find font-lock a bit too verbose. - (font-lock-fontify-buffer)) + (set-auto-mode)))) + ;; The mode function might have already turned on font-lock. + (unless (symbol-value 'font-lock-mode) + (font-lock-fontify-buffer))) ;; By default, XEmacs font-lock uses non-duplicable text ;; properties. This code forces all the text properties ;; to be copied along with the text. -- 1.7.10.4