From: ueno Date: Tue, 19 Dec 2006 09:08:08 +0000 (+0000) Subject: * epa.el (epa-protocol): New user option. X-Git-Tag: epg-0_0_9~15 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=f975f60b84c0d7fb9c34bd26e410511a1a0ca29f;p=elisp%2Fepg.git * epa.el (epa-protocol): New user option. --- 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))