(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
-(defun epa-encrypt-region (start end recipients sign)
+(defun epa-encrypt-region (start end recipients)
"Encrypt the current region between START and END for RECIPIENTS.
Don't use this command in Lisp programs!"
(list (region-beginning) (region-end)
(epa-select-keys (epg-make-context epa-protocol)
"Select recipients for encryption.
-If no one is selected, symmetric encryption will be performed. ")
- (if current-prefix-arg
- (y-or-n-p "Sign? ")))))
+If no one is selected, symmetric encryption will be performed. "))))
(save-excursion
(let ((context (epg-make-context epa-protocol))
cipher)
(epa--encode-coding-string
(buffer-substring start end)
epa-last-coding-system-specified)
- recipients sign))
+ recipients))
(message "Encrypting...done")
(delete-region start end)
(goto-char start)
'end-open t)))))
;;;###autoload
-(defun epa-encrypt (start end recipients sign)
+(defun epa-encrypt (start end recipients)
"Encrypt the current buffer.
Don't use this command in Lisp programs!"
(epg-list-keys
(epg-make-context epa-protocol)
(concat "<" recipient ">")))
- recipients)))))
- (if current-prefix-arg
- (y-or-n-p "Sign? "))))))
- (epa-encrypt-region start end recipients sign))
+ recipients)))))))))
+ (epa-encrypt-region start end recipients))
;;;###autoload
(defun epa-delete-keys (keys &optional allow-secret)