From: ueno Date: Sun, 12 Nov 2006 05:45:49 +0000 (+0000) Subject: (epg-delete-keys): Decode delete-problem. X-Git-Tag: epg-0_0_8~20 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=543bf369fd3143ed07f43eb7cac6b8db7a276bd5;p=elisp%2Fepg.git (epg-delete-keys): Decode delete-problem. --- diff --git a/ChangeLog b/ChangeLog index 5cfcd28..94ae19c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2006-11-12 Daiki Ueno + * epg.el (epg-delete-keys): Decode delete-problem. + * epa.el (epa-popup-info-window): Turn on by default. (epa-display-info): Split selected window instead of pop-to-buffer. diff --git a/epg.el b/epg.el index 18d3991..541f8f4 100644 --- a/epg.el +++ b/epg.el @@ -2303,11 +2303,11 @@ If you are unsure, use synchronous version of this function (epg--start context (cons (if allow-secret "--delete-secret-key" "--delete-key") - (mapcar - (lambda (key) - (epg-sub-key-id - (car (epg-key-sub-key-list key)))) - keys)))) + (mapcar + (lambda (key) + (epg-sub-key-id + (car (epg-key-sub-key-list key)))) + keys)))) ;;;###autoload (defun epg-delete-keys (context keys &optional allow-secret) @@ -2316,9 +2316,11 @@ If you are unsure, use synchronous version of this function (progn (epg-start-delete-keys context keys allow-secret) (epg-wait-for-completion context) - (if (epg-context-result-for context 'error) - (error "Delete keys failed: %S" - (epg-context-result-for context 'error)))) + (let ((entry (assq 'delete-problem + (epg-context-result-for context 'error)))) + (if entry + (error "Delete keys failed: %s" + (assq (cdr entry) epg-delete-problem-reason-alist))))) (epg-reset context))) ;;;###autoload