From: yamaoka Date: Mon, 5 Apr 1999 22:46:03 +0000 (+0000) Subject: * (mime-pgp-parse-verify-error): Use `with-current-buffer' instead of X-Git-Tag: semi-pgpgpg_03~4 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=b7dcde6c17c2e496a4f3ac204129671dd8f994db;p=elisp%2Fsemi.git * (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. --- 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)))