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.
(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")))