summaryrefslogtreecommitdiff
path: root/lisp/pgg-gpg.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/pgg-gpg.el')
-rw-r--r--lisp/pgg-gpg.el8
1 files changed, 5 insertions, 3 deletions
diff --git a/lisp/pgg-gpg.el b/lisp/pgg-gpg.el
index 4b8b79b068e..514be51a6a3 100644
--- a/lisp/pgg-gpg.el
+++ b/lisp/pgg-gpg.el
@@ -52,7 +52,7 @@
:type '(choice (const :tag "New `--recipient' option" "--recipient")
(const :tag "Old `--remote-user' option" "--remote-user")))
-(defcustom pgg-gpg-use-agent nil
+(defcustom pgg-gpg-use-agent t
"Whether to use gnupg agent for key caching."
:group 'pgg-gpg
:type 'boolean)
@@ -94,8 +94,10 @@
(if pgg-passphrase-coding-system
(progn
(setq encoded-passphrase-with-new-line
- (encode-coding-string passphrase-with-newline
- pgg-passphrase-coding-system))
+ (encode-coding-string
+ passphrase-with-newline
+ (coding-system-change-eol-conversion
+ pgg-passphrase-coding-system 'unix)))
(pgg-clear-string passphrase-with-newline))
(setq encoded-passphrase-with-new-line passphrase-with-newline
passphrase-with-newline nil))