From: yamaoka Date: Thu, 21 Oct 2004 12:56:26 +0000 (+0000) Subject: (mime-view-insert-fontified-text-content): Inhibit font-lock when running X-Git-Tag: emiko-1_14-epg-branchpoint~15 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a41047931adedc707c36baf3018e746e0443c546;p=elisp%2Fsemi.git (mime-view-insert-fontified-text-content): Inhibit font-lock when running the major-mode function instead of forcing execution of jit-lock. --- diff --git a/ChangeLog b/ChangeLog index d86c61a..85378c6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2004-10-21 Katsumi Yamaoka + + * 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 * mime-view.el (mime-view-insert-fontified-text-content): Use diff --git a/mime-view.el b/mime-view.el index 61e37c6..badf0b4 100644 --- a/mime-view.el +++ b/mime-view.el @@ -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)