diff options
author | Miles Bader <miles@gnu.org> | 2006-09-05 08:17:35 +0000 |
---|---|---|
committer | Miles Bader <miles@gnu.org> | 2006-09-05 08:17:35 +0000 |
commit | 8fbdffe57a11cb95aa620a3a34b4bbe25219218d (patch) | |
tree | 966a9817e5467826b59ac8b36f5eccbc2d4d6d95 /lisp/pgg-gpg.el | |
parent | 652bf3a19f5b1c8b72a0053b4d8fcb7879054285 (diff) | |
download | emacs-8fbdffe57a11cb95aa620a3a34b4bbe25219218d.tar.gz |
Merge from gnus--rel--5.10
Patches applied:
* gnus--rel--5.10 (patch 131-133)
- Update from CVS
2006-09-05 Daiki Ueno <ueno@unixuser.org>
* lisp/pgg.el (pgg-clear-string): Alias to clear-string for backward
compatibility.
* lisp/pgg-gpg.el (pgg-gpg-process-region): Avoid display blinking with
inhibit-redisplay; encode passphrase with locale-coding-system.
2006-09-04 Katsumi Yamaoka <yamaoka@jpl.org>
* lisp/gnus/gnus-art.el (article-decode-encoded-words): Make it fast.
2006-09-04 Katsumi Yamaoka <yamaoka@jpl.org>
* lisp/gnus/gnus-art.el (article-decode-encoded-words): Don't infloop in XEmacs.
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-424
Diffstat (limited to 'lisp/pgg-gpg.el')
-rw-r--r-- | lisp/pgg-gpg.el | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/lisp/pgg-gpg.el b/lisp/pgg-gpg.el index 46dbf833311..07be6c47f61 100644 --- a/lisp/pgg-gpg.el +++ b/lisp/pgg-gpg.el @@ -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) |