+2006-11-26 Daiki Ueno <ueno@unixuser.org>
+
+ * epa.el (epa-sign-file): Query signature type at a time.
+
2006-11-25 Daiki Ueno <ueno@unixuser.org>
* epa.el (epa-keys-mode): Don't call widget-setup.
(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))))