From f975f60b84c0d7fb9c34bd26e410511a1a0ca29f Mon Sep 17 00:00:00 2001 From: ueno Date: Tue, 19 Dec 2006 09:08:08 +0000 Subject: [PATCH] * epa.el (epa-protocol): New user option. --- ChangeLog | 3 ++- epa.el | 15 +++++++++++---- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 270c7db..d464b63 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,7 +2,8 @@ * epg.el (epg-export-keys-to-file): Fixed a typo. - * epa.el (epa-sign-region): --armor & --textmode. + * epa.el (epa-protocol): New user option. + (epa-sign-region): --armor & --textmode. (epa-encrypt-region): Ditto. (epa-list-keys): If prefix-arg is specified, use "OpenPGP" as the default protocol. diff --git a/epa.el b/epa.el index c9ed3c6..2e1206b 100644 --- a/epa.el +++ b/epa.el @@ -32,6 +32,12 @@ "The EasyPG Assistant" :group 'epg) +(defcustom epa-protocol 'OpenPGP + "The default protocol." + :type '(choice (const :tag "OpenPGP" OpenPGP) + (const :tag "CMS" CMS)) + :group 'epa) + (defcustom epa-armor nil "If non-nil, epa commands create ASCII armored output." :type 'boolean @@ -330,10 +336,11 @@ If ARG is non-nil, mark the current line." (if epa-list-keys-arguments (car epa-list-keys-arguments))))) (list (if (equal name "") nil name) - (y-or-n-p "Secret keys?") - (intern (completing-read "Protocol? (default OpenPGP) " - '(("OpenPGP") ("CMS")) - nil t nil nil "OpenPGP")))) + (y-or-n-p "Secret keys? ") + (intern (completing-read + (format "Protocol? (default %S) " epa-protocol) + '(("OpenPGP") ("CMS")) + nil t nil nil (symbol-name epa-protocol))))) (or epa-list-keys-arguments (list nil nil nil)))) (unless (and epa-keys-buffer (buffer-live-p epa-keys-buffer)) -- 1.7.10.4