From 543bf369fd3143ed07f43eb7cac6b8db7a276bd5 Mon Sep 17 00:00:00 2001 From: ueno Date: Sun, 12 Nov 2006 05:45:49 +0000 Subject: [PATCH] (epg-delete-keys): Decode delete-problem. --- ChangeLog | 2 ++ epg.el | 18 ++++++++++-------- 2 files changed, 12 insertions(+), 8 deletions(-) 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 -- 1.7.10.4