(mime-view-application/pgp): Specify representation-type by argument
authormorioka <morioka>
Sun, 28 Jun 1998 22:43:13 +0000 (22:43 +0000)
committermorioka <morioka>
Sun, 28 Jun 1998 22:43:13 +0000 (22:43 +0000)
of `mime-view-buffer'.

mime-pgp.el

index fe2e1f2..73ed035 100644 (file)
 ;;; It is based on draft-kazu-pgp-mime-00.txt (PGP-kazu).
 
 (defun mime-view-application/pgp (entity situation)
-  (let* ((start (mime-entity-point-min entity))
-        (end (mime-entity-point-max entity))
-        (entity-number (mime-raw-point-to-entity-number start))
-        (p-win (or (get-buffer-window mime-preview-buffer)
+  (let* ((p-win (or (get-buffer-window mime-preview-buffer)
                    (get-largest-window)))
-        (new-name (format "%s-%s" (buffer-name) entity-number))
+        (new-name
+         (format "%s-%s" (buffer-name) (mime-entity-number entity)))
         (the-buf (current-buffer))
         (mother mime-preview-buffer)
         representation-type)
     (set-buffer (get-buffer-create new-name))
     (erase-buffer)
-    (insert-buffer-substring the-buf start end)
+    (insert-buffer-substring
+     the-buf (mime-entity-point-min entity) (mime-entity-point-max entity))
     (cond ((progn
             (goto-char (point-min))
             (re-search-forward "^-+BEGIN PGP SIGNED MESSAGE-+$" nil t))
           (setq representation-type 'binary)
           ))
     (setq major-mode 'mime-show-message-mode)
-    (setq mime-raw-representation-type representation-type)
-    (save-window-excursion (mime-view-mode mother))
+    (save-window-excursion (mime-view-buffer nil nil mother
+                                            nil representation-type))
     (set-window-buffer p-win mime-preview-buffer)
     ))