From: morioka Date: Wed, 28 Jul 1999 15:04:29 +0000 (+0000) Subject: (mime-preview-original-major-mode): fixed. X-Git-Tag: remi-1_13_2~15 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=c58045a03098fff1587dc033e9116f100d132c56;p=elisp%2Fsemi.git (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. --- 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))