(pgg-pgp-messages-coding-system): New variable.
authortomo <tomo>
Mon, 25 Dec 2000 05:00:26 +0000 (05:00 +0000)
committertomo <tomo>
Mon, 25 Dec 2000 05:00:26 +0000 (05:00 +0000)
(pgg-pgp-process-region): Use `binary-to-text-funcall' instead of
`binary-start-process-shell-command'.
(pgg-scheme-verify-region): Use `binary-write-decoded-region' instead
of `binary-write-region'.

;; Ueno-sama, please forgive me.

pgg-pgp.el

index dadd5fe..c005a22 100644 (file)
@@ -25,6 +25,7 @@
 
 ;;; Code:
 
+(require 'mel) ; binary-to-text-funcall, binary-write-decoded-region
 (eval-when-compile (require 'pgg))
 
 (defgroup pgg-pgp ()
@@ -58,6 +59,9 @@ Bourne shell or its equivalent \(not tcsh) is needed for \"2>\"."
 (defvar pgg-pgp-user-id nil
   "PGP ID of your default identity.")
 
+(defvar pgg-pgp-messages-coding-system pgg-messages-coding-system
+  "Coding system used when reading from a PGP external process.")
+
 (defvar pgg-scheme-pgp-instance nil)
 
 ;;;###autoload
@@ -89,8 +93,9 @@ Bourne shell or its equivalent \(not tcsh) is needed for \"2>\"."
     (unwind-protect
        (progn
          (setq process
-               (apply #'binary-start-process-shell-command "*PGP*"
-                      output-buffer
+               (apply #'binary-to-text-funcall
+                      pgg-pgp-messages-coding-system
+                      #'start-process-shell-command "*PGP*" output-buffer
                       program args))
          (set-process-sentinel process #'ignore)
          (when passphrase
@@ -198,7 +203,7 @@ Bourne shell or its equivalent \(not tcsh) is needed for \"2>\"."
     (unwind-protect
        (progn
          (set-default-file-modes 448)
-         (binary-write-region start end orig-file))
+         (binary-write-decoded-region start end orig-file))
       (set-default-file-modes orig-mode))
     (when (stringp signature)
       (copy-file signature (setq signature (concat orig-file ".asc")))