* epa.el (epa-delete-keys): Support deletion of secret keys.
authorueno <ueno>
Sun, 30 Apr 2006 21:54:59 +0000 (21:54 +0000)
committerueno <ueno>
Sun, 30 Apr 2006 21:54:59 +0000 (21:54 +0000)
ChangeLog
epa.el

index a511449..e878e48 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
 2006-04-30  Daiki Ueno  <ueno@unixuser.org>
 
+       * epa.el (epa-delete-keys): Support deletion of secret keys.
+
        * pgg-epg.el (pgg-epg-decrypt-region): Convert line endings of the
        decrypted text.
 
diff --git a/epa.el b/epa.el
index 9ae9bf2..57dfca2 100644 (file)
--- a/epa.el
+++ b/epa.el
@@ -522,16 +522,17 @@ If no one is selected, symmetric encryption will be performed.  ")))
     (message "Encrypting %s...done" (file-name-nondirectory file))))
 
 ;;;###autoload
-(defun epa-delete-keys (keys)
+(defun epa-delete-keys (keys &optional allow-secret)
   "Delete selected KEYS."
   (interactive
    (let ((keys (epa-marked-keys)))
      (unless keys
        (error "No keys selected"))
-     (list keys)))
+     (list keys
+          (eq (nth 1 epa-list-keys-arguments) t))))
   (let ((context (epg-make-context)))
     (message "Deleting...")
-    (epg-delete-keys context keys)
+    (epg-delete-keys context keys allow-secret)
     (apply #'epa-list-keys epa-list-keys-arguments)
     (message "Deleting...done")))