From c58045a03098fff1587dc033e9116f100d132c56 Mon Sep 17 00:00:00 2001 From: morioka Date: Wed, 28 Jul 1999 15:04:29 +0000 Subject: [PATCH] (mime-preview-original-major-mode): fixed. (mime-view-entity-title): Use `mime-entity-read-field' instead of `mime-read-field'. (mime-display-message): Use `major-mode' of mime-entity-header-buffer as the default value of original-major-mode. --- mime-view.el | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/mime-view.el b/mime-view.el index 245684c..97060d9 100644 --- a/mime-view.el +++ b/mime-view.el @@ -130,7 +130,7 @@ mother-buffer." (set-buffer mime-mother-buffer) (mime-preview-original-major-mode recursive) ) - (cdr (assq 'original-major-mode + (cdr (assq 'major-mode (get-text-property (or point (point)) 'mime-view-situation))))) @@ -220,8 +220,8 @@ mother-buffer." situation)) (defun mime-view-entity-title (entity) - (or (mime-read-field 'Content-Description entity) - (mime-read-field 'Subject entity) + (or (mime-entity-read-field entity 'Content-Description) + (mime-entity-read-field entity 'Subject) (mime-entity-filename entity) "")) @@ -975,6 +975,10 @@ keymap of MIME-View mode." (or preview-buffer (setq preview-buffer (concat "*Preview-" (mime-entity-name message) "*"))) + (or original-major-mode + (setq original-major-mode + (with-current-buffer (mime-entity-header-buffer message) + major-mode))) ;; (set-buffer raw-buffer) ;; (setq mime-preview-buffer preview-buffer) (let ((inhibit-read-only t)) -- 1.7.10.4