[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/pgg-gpg.el,v
From: |
Miles Bader |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/pgg-gpg.el,v |
Date: |
Tue, 05 Sep 2006 08:17:37 +0000 |
CVSROOT: /cvsroot/emacs
Module name: emacs
Changes by: Miles Bader <miles> 06/09/05 08:17:35
Index: pgg-gpg.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/pgg-gpg.el,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -b -r1.16 -r1.17
--- pgg-gpg.el 4 Sep 2006 06:27:27 -0000 1.16
+++ pgg-gpg.el 5 Sep 2006 08:17:34 -0000 1.17
@@ -74,7 +74,10 @@
(errors-buffer pgg-errors-buffer)
(orig-mode (default-file-modes))
(process-connection-type nil)
- process status exit-status)
+ (inhibit-redisplay t)
+ process status exit-status
+ passphrase-with-newline
+ encoded-passphrase-with-new-line)
(with-current-buffer (get-buffer-create errors-buffer)
(buffer-disable-undo)
(erase-buffer))
@@ -87,7 +90,16 @@
program args)))
(set-process-sentinel process #'ignore)
(when passphrase
- (process-send-string process (concat passphrase "\n")))
+ (setq passphrase-with-newline (concat passphrase "\n"))
+ (if (boundp 'locale-coding-system)
+ (progn
+ (setq encoded-passphrase-with-new-line
+ (encode-coding-string passphrase-with-newline
+ locale-coding-system))
+ (pgg-clear-string passphrase-with-newline))
+ (setq encoded-passphrase-with-new-line passphrase-with-newline
+ passphrase-with-newline nil))
+ (process-send-string process encoded-passphrase-with-new-line))
(process-send-region process start end)
(process-send-eof process)
(while (eq 'run (process-status process))
@@ -108,6 +120,10 @@
(error "%s exited abnormally: '%s'" program exit-status))
(if (= 127 exit-status)
(error "%s could not be found" program))))
+ (if passphrase-with-newline
+ (pgg-clear-string passphrase-with-newline))
+ (if encoded-passphrase-with-new-line
+ (pgg-clear-string encoded-passphrase-with-new-line))
(if (and process (eq 'run (process-status process)))
(interrupt-process process))
(if (file-exists-p output-file-name)