From: hayashi Date: Mon, 19 Jun 2000 09:13:50 +0000 (+0000) Subject: * mime-view.el (mime-display-multipart/encrypted): New function. X-Git-Tag: emy-1_13_8~9 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=b5f28137b05400346486b35775a1f254de7b330e;p=elisp%2Fsemi.git * mime-view.el (mime-display-multipart/encrypted): New function. * semi-setup.el: Set up multipart/encrypted. --- diff --git a/ChangeLog b/ChangeLog index f6481ff..f557ae3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2000-06-19 Yoshiki Hayashi + * mime-view.el (mime-display-multipart/encrypted): New function. + * semi-setup.el: Set up multipart/encrypted. + +2000-06-19 Yoshiki Hayashi + * mime-edit.el (mime-edit-insert-file): Don't produce charset=x-unknown. diff --git a/mime-view.el b/mime-view.el index 9a4b0e3..60bf1de 100644 --- a/mime-view.el +++ b/mime-view.el @@ -874,6 +874,25 @@ Please press `v' key in this buffer.")) situations (cdr situations) i (1+ i))))) +(defun mime-display-multipart/encrypted (entity situation) + (let ((children (mime-entity-children entity)) + (original-major-mode-cell (assq 'major-mode situation)) + (default-situation + (cdr (assq 'childrens-situation situation)))) + (if original-major-mode-cell + (setq default-situation + (cons original-major-mode-cell default-situation))) + (mime-display-entity (car children) nil default-situation) + (mime-display-entity (cadr children) nil + (put-alist '*entity-button + 'invisible default-situation)) + (del-alist '*entity-button default-situation) + (setq children (nth 2 children)) + ;; This shouldn't happen. + (while children + (mime-display-entity (car children) nil default-situation) + (setq children (cdr children))))) + (defun mime-display-detect-application/octet-stream (entity situation) "Detect unknown ENTITY and display it inline. This can only handle gzipped contents." diff --git a/semi-setup.el b/semi-setup.el index 9580366..c445244 100644 --- a/semi-setup.el +++ b/semi-setup.el @@ -81,6 +81,10 @@ it is used as hook to set." 'preview '((type . application)(subtype . pgp) (message-button . visible))) (mime-add-condition + 'preview '((type . multipart) (subtype . encrypted) + (body . visible) + (body-presentation-method . mime-display-multipart/encrypted))) + (mime-add-condition 'action '((type . application)(subtype . pgp) (method . mime-view-application/pgp)) 'strict "mime-pgp")