(defun epa-sign-file (file signers mode)
"Sign FILE by SIGNERS keys selected."
(interactive
- (list (expand-file-name (read-file-name "File: "))
- (if current-prefix-arg
- (epa-select-keys (epg-make-context epa-protocol)
- "Select keys for signing.
+ (let ((verbose current-prefix-arg))
+ (list (expand-file-name (read-file-name "File: "))
+ (if verbose
+ (epa-select-keys (epg-make-context epa-protocol)
+ "Select keys for signing.
If no one is selected, default secret key is used. "
- nil t))
- (if current-prefix-arg
- (epa--read-signature-type)
- 'clear)))
+ nil t))
+ (if verbose
+ (epa--read-signature-type)
+ 'clear))))
(let ((signature (concat file
(if (eq epa-protocol 'OpenPGP)
(if (or epa-armor
Don't use this command in Lisp programs!"
(interactive
- (progn
+ (let ((verbose current-prefix-arg))
(setq epa-last-coding-system-specified
(or coding-system-for-write
(epa--select-safe-coding-system
(region-beginning) (region-end))))
(list (region-beginning) (region-end)
- (if current-prefix-arg
+ (if verbose
(epa-select-keys (epg-make-context epa-protocol)
"Select keys for signing.
If no one is selected, default secret key is used. "
nil t))
- (if current-prefix-arg
+ (if verbose
(epa--read-signature-type)
'clear))))
(save-excursion
(setq epa-last-coding-system-specified
(or coding-system-for-write
(epa--select-safe-coding-system (point) (point-max))))
- (list (point) (point-max)
- (if current-prefix-arg
- (epa-select-keys (epg-make-context epa-protocol)
- "Select keys for signing.
+ (let ((verbose current-prefix-arg))
+ (list (point) (point-max)
+ (if verbose
+ (epa-select-keys (epg-make-context epa-protocol)
+ "Select keys for signing.
If no one is selected, default secret key is used. "
- nil t))
- (if current-prefix-arg
- (epa--read-signature-type)
- 'clear))))
+ nil t))
+ (if verbose
+ (epa--read-signature-type)
+ 'clear)))))
(epa-sign-region start end signers mode))
;;;###autoload
Don't use this command in Lisp programs!"
(interactive
(save-excursion
- (let (recipients)
+ (let ((verbose current-prefix-arg)
+ recipients)
(goto-char (point-min))
(when (epa--mail-mode-p)
(save-restriction
(or coding-system-for-write
(epa--select-safe-coding-system (point) (point-max))))
(list (point) (point-max)
- (if current-prefix-arg
+ (if verbose
(epa-select-keys
(epg-make-context epa-protocol)
"Select recipients for encryption.
(epg-make-context epa-protocol)
(concat "<" recipient ">")))
recipients)))))
- (if current-prefix-arg
+ (if verbose
(y-or-n-p "Sign? "))))))
(epa-encrypt-region start end recipients sign))