(mime-view-application/pgp): Use function
authormorioka <morioka>
Sun, 21 Jun 1998 14:56:51 +0000 (14:56 +0000)
committermorioka <morioka>
Sun, 21 Jun 1998 14:56:51 +0000 (14:56 +0000)
`mime-entity-representation-type'.

mime-pgp.el

index fa33f4f..90aad3a 100644 (file)
@@ -71,7 +71,6 @@
         (new-name (format "%s-%s" (buffer-name) entity-number))
         (the-buf (current-buffer))
         (mother mime-preview-buffer)
-        (mode major-mode)
         representation-type)
     (set-buffer (get-buffer-create new-name))
     (erase-buffer)
@@ -94,9 +93,7 @@
           (while (re-search-forward "^- -" nil t)
             (replace-match "-")
             )
-          (setq representation-type
-                (cdr (or (assq mode mime-raw-representation-type-alist)
-                         (assq t    mime-raw-representation-type-alist))))
+          (setq representation-type (mime-entity-representation-type entity))
           )
          ((progn
             (goto-char (point-min))
@@ -168,14 +165,14 @@ It should be ISO 639 2 letter language code such as en, ja, ...")
         (onum (if (> knum 0)
                   (1- knum)
                 (1+ knum)))
-        (oinfo (mime-raw-find-entity-from-node-id
-                (cons onum mother-node-id) mime-message-structure))
+        (orig-entity (mime-raw-find-entity-from-node-id
+                      (cons onum mother-node-id) mime-message-structure))
         (basename (expand-file-name "tm" mime-temp-directory))
         (orig-file (make-temp-name basename))
         (sig-file (concat orig-file ".sig"))
         )
-    (mime-raw-write-region (mime-entity-point-min oinfo)
-                          (mime-entity-point-max oinfo)
+    (mime-raw-write-region (mime-entity-point-min orig-entity)
+                          (mime-entity-point-max orig-entity)
                           orig-file)
     (save-excursion (mime-show-echo-buffer))
     (mime-write-decoded-region (save-excursion
@@ -228,9 +225,9 @@ It should be ISO 639 2 letter language code such as en, ja, ...")
         (onum (if (> knum 0)
                   (1- knum)
                 (1+ knum)))
-        (oinfo (mime-raw-find-entity-from-node-id
-                (cons onum mother-node-id) mime-message-structure)))
-    (mime-view-application/pgp oinfo situation)
+        (orig-entity (mime-raw-find-entity-from-node-id
+                      (cons onum mother-node-id) mime-message-structure)))
+    (mime-view-application/pgp orig-entity situation)
     ))