* pgg-gpg.el (pgg-gpg-encrypt-region): Ditto.
* mml2015.el (mml2015-pgg-encrypt): Ditto.
2002-10-04 Simon Josefsson <jas@extundo.com>
2002-10-04 Simon Josefsson <jas@extundo.com>
+ * pgg.el (pgg-encrypt-region): Support sign.
+
+ * pgg-gpg.el (pgg-gpg-encrypt-region): Ditto.
+
+ * mml2015.el (mml2015-pgg-encrypt): Ditto.
+
* pgg.el, pgg-def.el, pgg-parse.el, pgg-gpg.el, pgg-pgp5.el,
pgg-pgp6.el: Moved from ../pgg/. Modifications compared to EMIKO
branch where PGG was taken from in the ChangeLog entries below.
* pgg.el, pgg-def.el, pgg-parse.el, pgg-gpg.el, pgg-pgp5.el,
pgg-pgp6.el: Moved from ../pgg/. Modifications compared to EMIKO
branch where PGG was taken from in the ChangeLog entries below.
(message-options-get 'message-recipients)
(message-options-set 'message-recipients
(read-string "Recipients: ")))
(message-options-get 'message-recipients)
(message-options-set 'message-recipients
(read-string "Recipients: ")))
+ "[ \f\t\n\r\v,]+")
+ sign)
(pop-to-buffer mml2015-result-buffer)
(error "Encrypt error"))
(delete-region (point-min) (point-max))
(pop-to-buffer mml2015-result-buffer)
(error "Encrypt error"))
(delete-region (point-min) (point-max))
(progn (end-of-line)(point)))
":")) 8)))))
(progn (end-of-line)(point)))
":")) 8)))))
-(defun pgg-gpg-encrypt-region (start end recipients)
- "Encrypt the current region between START and END."
+(defun pgg-gpg-encrypt-region (start end recipients &optional sign)
+ "Encrypt the current region between START and END.
+If optional argument SIGN is non-nil, do a combined sign and encrypt."
(let* ((pgg-gpg-user-id (or pgg-gpg-user-id pgg-default-user-id))
(args
(let* ((pgg-gpg-user-id (or pgg-gpg-user-id pgg-default-user-id))
(args
- `("--batch" "--armor" "--always-trust" "--encrypt"
+ `("--batch" "--armor" "--always-trust"
+ (if sign "--sign --encrypt" "--encrypt")
,@(if recipients
(apply #'nconc
(mapcar (lambda (rcpt)
,@(if recipients
(apply #'nconc
(mapcar (lambda (rcpt)
-(defun pgg-encrypt-region (start end rcpts)
- "Encrypt the current region between START and END for RCPTS."
+(defun pgg-encrypt-region (start end rcpts &optional sign)
+ "Encrypt the current region between START and END for RCPTS.
+If optional argument SIGN is non-nil, do a combined sign and encrypt."
(interactive
(list (region-beginning)(region-end)
(split-string (read-string "Recipients: ") "[ \t,]+")))
(let ((status
(pgg-save-coding-system start end
(pgg-invoke "encrypt-region" (or pgg-scheme pgg-default-scheme)
(interactive
(list (region-beginning)(region-end)
(split-string (read-string "Recipients: ") "[ \t,]+")))
(let ((status
(pgg-save-coding-system start end
(pgg-invoke "encrypt-region" (or pgg-scheme pgg-default-scheme)
- (point-min) (point-max) rcpts))))
+ (point-min) (point-max) rcpts sign))))
(when (interactive-p)
(pgg-display-output-buffer start end status))
status))
(when (interactive-p)
(pgg-display-output-buffer start end status))
status))