From: yamaoka Date: Fri, 21 May 1999 09:05:11 +0000 (+0000) Subject: (mime-pgp-fetch-key): Returns nil if the fetched key is discarded. X-Git-Tag: semi-pgpgpg_17~3 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bf9724bd942f72a0e8102c648935377b5763835c;p=elisp%2Fsemi.git (mime-pgp-fetch-key): Returns nil if the fetched key is discarded. --- diff --git a/mime-pgp.el b/mime-pgp.el index 23ed8d3..076f8e1 100644 --- a/mime-pgp.el +++ b/mime-pgp.el @@ -776,10 +776,18 @@ appropriately." (save-window-excursion (funcall show-function armor) (if (y-or-n-p "Add this key to keyring? ") - (with-temp-buffer - (insert armor) - (funcall snarf-function))) - t) + (if (zerop + (with-temp-buffer + (insert armor) + ;; The function should return a number of + ;; keys found. + (funcall snarf-function))) + (progn + (message "Key not found or discarded.") + nil) + t) + (message "Aborted") + nil)) (message "Key not found.") nil)))))