From d5c0cb1cadaa18e3b7611e6833742f959ce0431b Mon Sep 17 00:00:00 2001 From: ueno Date: Sat, 25 Nov 2006 22:57:43 +0000 Subject: [PATCH] (epa-sign-file): Query signature type at a time. --- ChangeLog | 4 ++++ epa.el | 24 ++++++++++++++++++++---- 2 files changed, 24 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3adb5a4..5902a9d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2006-11-26 Daiki Ueno + + * epa.el (epa-sign-file): Query signature type at a time. + 2006-11-25 Daiki Ueno * epa.el (epa-keys-mode): Don't call widget-setup. diff --git a/epa.el b/epa.el index 4ef4094..d105cb7 100644 --- a/epa.el +++ b/epa.el @@ -614,10 +614,26 @@ If SECRET is non-nil, list secret keys instead of public keys." (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 ((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 +")))) + (t + (throw 'done nil)))))))) (let ((signature (concat file (if (or epa-armor (not (memq mode '(nil t normal detached)))) -- 1.7.10.4