From bf9724bd942f72a0e8102c648935377b5763835c Mon Sep 17 00:00:00 2001 From: yamaoka Date: Fri, 21 May 1999 09:05:11 +0000 Subject: [PATCH] (mime-pgp-fetch-key): Returns nil if the fetched key is discarded. --- mime-pgp.el | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) 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))))) -- 1.7.10.4