* mime-pgp.el (mime-add-application/pgp-keys): Don't display
authorueno <ueno>
Fri, 5 Nov 1999 07:59:07 +0000 (07:59 +0000)
committerueno <ueno>
Fri, 5 Nov 1999 07:59:07 +0000 (07:59 +0000)
public key block; snarf keys immediately.

mime-pgp.el

index f499c4e..a42af5a 100644 (file)
@@ -203,26 +203,14 @@ It should be ISO 639 2 letter language code such as en, ja, ...")
 ;;; It is based on RFC 2015 (PGP/MIME).
 
 (defun mime-add-application/pgp-keys (entity situation)
-  (let* ((start (mime-entity-header-start-point entity))
-        (end (mime-entity-body-end-point entity))
-        (entity-number (mime-entity-number entity))
-        (new-name (format "%s-%s" (buffer-name) entity-number))
-        (encoding (cdr (assq 'encoding situation)))
-        str)
-    (setq str (buffer-substring start end))
-    (switch-to-buffer new-name)
-    (setq buffer-read-only nil)
-    (erase-buffer)
-    (insert str)
-    (goto-char (point-min))
-    (if (re-search-forward "^\n" nil t)
-       (delete-region (point-min) (match-end 0))
-      )
-    (mime-decode-region (point-min)(point-max) encoding)
-    (funcall (pgp-function 'snarf-keys)
-            (point-min)(point-max))
-    (kill-buffer (current-buffer))
-    ))
+  (save-excursion (mime-show-echo-buffer))
+  (with-temp-buffer
+    (mime-insert-entity-content entity)
+    (mime-decode-region (point-min) (point-max)
+                        (cdr (assq 'encoding situation)))
+    (let ((pgg-output-buffer mime-echo-buffer-name))
+      (funcall (pgp-function 'snarf-keys)
+              (point-min)(point-max)))))
 
 
 ;;; @ end