From b7dcde6c17c2e496a4f3ac204129671dd8f994db Mon Sep 17 00:00:00 2001 From: yamaoka Date: Mon, 5 Apr 1999 22:46:03 +0000 Subject: [PATCH] * (mime-pgp-parse-verify-error): Use `with-current-buffer' instead of `save-current-buffer'. (mime-pgp-check-signature): Use `with-current-buffer' instead of `save-current-buffer'; add comment about PGP 5.0i. --- ChangeLog | 7 +++++++ mime-pgp.el | 11 +++++------ 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index ad8cdce..9d3bed7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +1999-04-05 Katsumi Yamaoka + + * mime-pgp.el (mime-pgp-parse-verify-error): Use + `with-current-buffer' instead of `save-current-buffer'. + (mime-pgp-check-signature): Use `with-current-buffer' instead of + `save-current-buffer'; add comment about PGP 5.0i. + 1999-04-06 Shuhei KOBAYASHI * mime-edit.el (mime-delete-field): Use `std11-field-end'. diff --git a/mime-pgp.el b/mime-pgp.el index d3f2a68..f32f408 100644 --- a/mime-pgp.el +++ b/mime-pgp.el @@ -263,8 +263,7 @@ or \"v\" for choosing a command of PGP 5.0i." ))) (defun mime-pgp-check-signature (output-buffer orig-file) - (save-current-buffer - (set-buffer output-buffer) + (with-current-buffer output-buffer (erase-buffer) (setq truncate-lines t)) (let* ((lang (mime-pgp-default-language)) @@ -287,8 +286,7 @@ or \"v\" for choosing a command of PGP 5.0i." (if (zerop (apply 'call-process-region (point-min) (point-max) command nil output-buffer nil args)) - (save-current-buffer - (set-buffer output-buffer) + (with-current-buffer output-buffer (goto-char (point-min)) (cond ((not (stringp regexp)) @@ -302,6 +300,8 @@ or \"v\" for choosing a command of PGP 5.0i." ) (t (message "Bad signature") + ;; PGP 5.0i always returns 0 status, so returns nil + ;; in order for attempt to fetch key. (not (eq 'pgp50 pgp-version)) )) ) @@ -309,8 +309,7 @@ or \"v\" for choosing a command of PGP 5.0i." nil))) (defmacro mime-pgp-parse-verify-error (&rest forms) - (` (save-current-buffer - (set-buffer mime-echo-buffer-name) + (` (with-current-buffer mime-echo-buffer-name (goto-char (point-min)) (prog1 (let ((regexp (mime-pgp-key-expected-regexp))) -- 1.7.10.4