* mime-view.el (mime-view-insert-fontified-text-content): Use
authoryoichi <yoichi>
Thu, 21 Oct 2004 00:21:29 +0000 (00:21 +0000)
committeryoichi <yoichi>
Thu, 21 Oct 2004 00:21:29 +0000 (00:21 +0000)
dummy absolute path in buffer-file-name. (by Katsumi Yamaoka)
Force fontify for jit-lock-mode.

ChangeLog
mime-view.el

index 95d6f95..d86c61a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2004-10-21  Yoichi NAKAYAMA  <yoichi@geiin.org>
+
+       * 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  <yoichi@geiin.org>
 
        * mime-edit.el (mime-edit-temp-message-buffer): Define.
index c97f93d..61e37c6 100644 (file)
@@ -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.