From: ueno Date: Wed, 22 Nov 2006 22:52:41 +0000 (+0000) Subject: (epa-sign-region): Query signature type at a time. X-Git-Tag: epg-0_0_8~11 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=7cff708cbd3c501c6ee2fa13f828194230e4708d;p=elisp%2Fepg.git (epa-sign-region): Query signature type at a time. --- diff --git a/ChangeLog b/ChangeLog index 67b37e4..e2341d0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2006-11-23 Daiki Ueno + + * epa.el (epa-sign-region): Query signature type at a time. + 2006-11-22 Hiroya Murata * epg.el (epg-context-set-passphrase-callback): Add optional diff --git a/epa.el b/epa.el index 9731a5f..8036040 100644 --- a/epa.el +++ b/epa.el @@ -757,10 +757,26 @@ Don't use this command in Lisp programs!" (epa-select-keys (epg-make-context) "Select keys for signing. If no one is selected, default secret key is used. " nil t) - (if (y-or-n-p "Make a detached signature? ") - 'detached - (if (y-or-n-p "Make a cleartext signature? ") - 'clear)))) + (catch 'done + (while t + (message "Signature type (N,c,d,?) ") + (let ((c (read-char))) + (cond ((or (eq c ?n) (eq c ?\n)) + (throw 'done nil)) + ((eq c ?c) + (throw 'done 'clear)) + ((eq c ?d) + (throw 'done 'detached)) + ((eq c ??) + (with-output-to-temp-buffer "*Help*" + (save-excursion + (set-buffer standard-output) + (insert "\ +n - Create a normal signature +c - Create a cleartext signature +d - Create a detached signature +? - Show this help +")))))))))) (save-excursion (let ((context (epg-make-context)) signature)