From: tomo Date: Thu, 17 Feb 2000 08:26:00 +0000 (+0000) Subject: (mime-display-entity): Find `header-presentation-method' only if X-Git-Tag: remi-1_14_0~7 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9eb96dfd3d3007afda8dd3295b9029a2ed6048ab;p=elisp%2Fsemi.git (mime-display-entity): Find `header-presentation-method' only if `header-is-visible'. --- diff --git a/mime-view.el b/mime-view.el index 88c6ae6..7b6c0fc 100644 --- a/mime-view.el +++ b/mime-view.el @@ -984,10 +984,6 @@ MEDIA-TYPE must be (TYPE . SUBTYPE), TYPE or t. t means default." (eq (cdr (or (assq '*header situation) (assq 'header situation))) 'visible)) - (header-presentation-method - (or (cdr (assq 'header-presentation-method situation)) - (cdr (assq (cdr (assq 'major-mode situation)) - mime-header-presentation-method-alist)))) (body-presentation-method (cdr (assq 'body-presentation-method situation))) (children (mime-entity-children entity))) @@ -999,18 +995,21 @@ MEDIA-TYPE must be (TYPE . SUBTYPE), TYPE or t. t means default." (mime-view-insert-entity-button entity) ;; ) ) - (when header-is-visible - (setq nhb (point)) - (if header-presentation-method - (funcall header-presentation-method entity situation) - (mime-insert-header entity - mime-view-ignored-field-list - mime-view-visible-field-list)) - (run-hooks 'mime-display-header-hook) - (put-text-property nhb (point-max) 'mime-view-entity-header entity) - (goto-char (point-max)) - (insert "\n") - ) + (if header-is-visible + (let ((header-presentation-method + (or (cdr (assq 'header-presentation-method situation)) + (cdr (assq (cdr (assq 'major-mode situation)) + mime-header-presentation-method-alist))))) + (setq nhb (point)) + (if header-presentation-method + (funcall header-presentation-method entity situation) + (mime-insert-header entity + mime-view-ignored-field-list + mime-view-visible-field-list)) + (run-hooks 'mime-display-header-hook) + (put-text-property nhb (point-max) 'mime-view-entity-header entity) + (goto-char (point-max)) + (insert "\n"))) (setq nbb (point)) (cond (children) ((functionp body-presentation-method)