+2005-01-21 Derek Atkins <warlord@MIT.EDU> (tiny change)
+
+ * pgg-pgp.el (pgg-pgp-decrypt-region): Use passphrase cache.
+
2005-10-08 Simon Josefsson <jas@extundo.com>
* pgg-parse.el (top-level): Don't require custom, it is
(defun pgg-pgp-decrypt-region (start end)
"Decrypt the current region between START and END."
(let* ((pgg-pgp-user-id (or pgg-pgp-user-id pgg-default-user-id))
+ (key (pgg-pgp-lookup-key pgg-pgp-user-id 'encrypt))
(passphrase
(pgg-read-passphrase
- (format "PGP passphrase for %s: " pgg-pgp-user-id)
- (pgg-pgp-lookup-key pgg-pgp-user-id 'encrypt)))
+ (format "PGP passphrase for %s: " pgg-pgp-user-id) key))
(args
'("+verbose=1" "+batchmode" "+language=us" "-f")))
(pgg-pgp-process-region start end passphrase pgg-pgp-program args)
- (pgg-process-when-success nil)))
+ (pgg-process-when-success
+ (if pgg-cache-passphrase
+ (pgg-add-passphrase-cache key passphrase)))))
(defun pgg-pgp-sign-region (start end &optional clearsign)
"Make detached signature from text between START and END."