From db1170cdbba33fcdbee76c3226962f41c91df666 Mon Sep 17 00:00:00 2001 From: ueno Date: Fri, 5 Nov 1999 07:59:07 +0000 Subject: [PATCH] * mime-pgp.el (mime-add-application/pgp-keys): Don't display public key block; snarf keys immediately. --- mime-pgp.el | 28 ++++++++-------------------- 1 file changed, 8 insertions(+), 20 deletions(-) diff --git a/mime-pgp.el b/mime-pgp.el index f499c4e..a42af5a 100644 --- a/mime-pgp.el +++ b/mime-pgp.el @@ -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 -- 1.7.10.4