* mime-view.el (mime-display-multipart/encrypted): New function.
authorhayashi <hayashi>
Mon, 19 Jun 2000 09:13:50 +0000 (09:13 +0000)
committerhayashi <hayashi>
Mon, 19 Jun 2000 09:13:50 +0000 (09:13 +0000)
* semi-setup.el: Set up multipart/encrypted.

ChangeLog
mime-view.el
semi-setup.el

index f6481ff..f557ae3 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 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.
 
index 9a4b0e3..60bf1de 100644 (file)
@@ -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."
index 9580366..c445244 100644 (file)
@@ -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")