2000-06-19 Yoshiki Hayashi <yoshiki@xemacs.org>
+ * mime-view.el (mime-display-multipart/encrypted): New function.
+ * semi-setup.el: Set up multipart/encrypted.
+
+2000-06-19 Yoshiki Hayashi <yoshiki@xemacs.org>
+
* mime-edit.el (mime-edit-insert-file): Don't produce
charset=x-unknown.
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."
'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")