(mime-view-insert-fontified-text-content): Inhibit font-lock when running
authoryamaoka <yamaoka>
Thu, 21 Oct 2004 12:56:26 +0000 (12:56 +0000)
committeryamaoka <yamaoka>
Thu, 21 Oct 2004 12:56:26 +0000 (12:56 +0000)
 the major-mode function instead of forcing execution of jit-lock.

ChangeLog
mime-view.el

index d86c61a..85378c6 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2004-10-21  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+       * mime-view.el (mime-view-insert-fontified-text-content): Inhibit
+       font-lock when running the major-mode function instead of forcing
+       execution of jit-lock.
+
 2004-10-21  Yoichi NAKAYAMA  <yoichi@geiin.org>
 
        * mime-view.el (mime-view-insert-fontified-text-content): Use
index 61e37c6..badf0b4 100644 (file)
@@ -977,14 +977,18 @@ 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)
-           (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)
+           ;; 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))
+             (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)