From c3427b4cf9557b4458f394a36fb4ec6f8e74d565 Mon Sep 17 00:00:00 2001 From: yoichi Date: Thu, 21 Oct 2004 00:21:29 +0000 Subject: [PATCH] * mime-view.el (mime-view-insert-fontified-text-content): Use dummy absolute path in buffer-file-name. (by Katsumi Yamaoka) Force fontify for jit-lock-mode. --- ChangeLog | 6 ++++++ mime-view.el | 20 +++++++++++--------- 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index 95d6f95..d86c61a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2004-10-21 Yoichi NAKAYAMA + + * mime-view.el (mime-view-insert-fontified-text-content): Use + dummy absolute path in buffer-file-name. (by Katsumi Yamaoka) + Force fontify for jit-lock-mode. + 2004-09-27 Yoichi NAKAYAMA * mime-edit.el (mime-edit-temp-message-buffer): Define. diff --git a/mime-view.el b/mime-view.el index c97f93d..61e37c6 100644 --- a/mime-view.el +++ b/mime-view.el @@ -977,18 +977,20 @@ MEDIA-TYPE must be (TYPE . SUBTYPE), TYPE or t. t means default." (buffer-disable-undo) (kill-all-local-variables) (mime-view-insert-text-content entity situation) - (if mode - (funcall mode) - (if (setq filename (mime-entity-filename entity)) - (unwind-protect - (progn - (setq buffer-file-name filename) - (set-auto-mode)) - (setq buffer-file-name 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)))) (require 'font-lock) (let ((font-lock-verbose nil)) ;; I find font-lock a bit too verbose. - (font-lock-fontify-buffer)) + (font-lock-fontify-buffer) + (when (and (boundp 'jit-lock-mode) + jit-lock-mode) + (jit-lock-fontify-now))) ;; 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