2000-12-21 Tadashi Watanabe <watanabe@sigmaitec.co.jp>
authorueno <ueno>
Thu, 21 Dec 2000 14:07:55 +0000 (14:07 +0000)
committerueno <ueno>
Thu, 21 Dec 2000 14:07:55 +0000 (14:07 +0000)
        * pgg-gpg.el (pgg-scheme-verify-region): Use a "-" as the name for
        the file with the signed material.

2000-12-21   Daiki Ueno  <ueno@unixuser.org>

        * pgg-def.el (pgg-messages-coding-system): New user option.

        * pgg-gpg.el (pgg-gpg-messages-coding-system): New variable.
        (pgg-gpg-process-region): Don't use `binary-start-process'; bind
        `coding-system-for-read' to `pgg-gpg-messages-coding-system'.

pgg-def.el
pgg-gpg.el

index cb3fff8..d5f01b8 100644 (file)
   :group 'pgg
   :type 'boolean)
 
+(defcustom pgg-messages-coding-system 'undecided
+  "Coding system used when reading from a PGP external process."
+  :group 'pgg
+  :type 'coding-system)
+
 (defvar pgg-status-buffer " *PGG status*")
 (defvar pgg-errors-buffer " *PGG errors*")
 (defvar pgg-output-buffer " *PGG output*")
index 0d5c833..d288082 100644 (file)
@@ -47,6 +47,9 @@
 (defvar pgg-gpg-user-id nil
   "GnuPG ID of your default identity.")
 
+(defvar pgg-gpg-messages-coding-system pgg-messages-coding-system
+  "Coding system used when reading from a GnuPG external process.")
+
 (defvar pgg-scheme-gpg-instance nil)
 
 ;;;###autoload
     (unwind-protect
        (progn
          (set-default-file-modes 448)
-         (setq process
-               (apply #'binary-start-process "*GnuPG*" errors-buffer
-                      program args))
+         (let ((coding-system-for-read 'pgg-gpg-messages-coding-system)
+               (coding-system-for-write 'binary))
+           (setq process
+                 (apply #'start-process "*GnuPG*" errors-buffer
+                        program args)))
          (set-process-sentinel process #'ignore)
          (when passphrase
            (process-send-string process (concat passphrase "\n")))
   (let ((args '("--batch" "--verify")))
     (when (stringp signature)
       (setq args (append args (list signature))))
+    (setq args (append args '("-")))
     (pgg-gpg-process-region start end nil pgg-gpg-program args)
     (with-current-buffer pgg-errors-buffer
       (goto-char (point-min))