From: morioka Date: Sun, 21 Jun 1998 14:51:40 +0000 (+0000) Subject: (mime-entity-representation-type): New function. X-Git-Tag: semi-1_7_1~17 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=aeadb8000788e6ae6970c6f6dd1991bdbef49286;p=elisp%2Fsemi.git (mime-entity-representation-type): New function. (mime-entity-cooked-p): New function. (mime-display-entity): Use function `mime-entity-cooked-p'. --- diff --git a/mime-view.el b/mime-view.el index 19b2c5f..68314de 100644 --- a/mime-view.el +++ b/mime-view.el @@ -175,6 +175,15 @@ mother-buffer." ;;; @ entity information ;;; +(defsubst mime-entity-representation-type (entity) + (with-current-buffer (mime-entity-buffer entity) + (or mime-raw-representation-type + (cdr (or (assq major-mode mime-raw-representation-type-alist) + (assq t mime-raw-representation-type-alist)))))) + +(defsubst mime-entity-cooked-p (entity) + (eq (mime-entity-representation-type entity) 'cooked)) + (defsubst mime-entity-parent (entity &optional message-info) "Return mother entity of ENTITY. If optional argument MESSAGE-INFO is not specified, @@ -785,15 +794,13 @@ The compressed face will be piped to this command.") (when header-is-visible (if header-presentation-method (funcall header-presentation-method entity situation) - (mime-insert-decoded-header - entity - mime-view-ignored-field-list mime-view-visible-field-list - (save-excursion - (set-buffer raw-buffer) - (if (eq (cdr (assq major-mode mime-raw-representation-type-alist)) - 'binary) - default-mime-charset) - ))) + (mime-insert-decoded-header entity + mime-view-ignored-field-list + mime-view-visible-field-list + (if (mime-entity-cooked-p entity) + nil + default-mime-charset)) + ) (goto-char (point-max)) (insert "\n") (run-hooks 'mime-display-header-hook)