* pgg.texi (Registering backend): New section.
[elisp/semi.git] / pgg-gpg.el
index 0d5c833..873cff4 100644 (file)
@@ -25,6 +25,7 @@
 
 ;;; Code:
 
+(require 'mel) ; binary-to-text-funcall
 (eval-when-compile (require 'pgg))
 
 (defgroup pgg-gpg ()
     (unwind-protect
        (progn
          (set-default-file-modes 448)
-         (setq process
-               (apply #'binary-start-process "*GnuPG*" errors-buffer
-                      program args))
+         (let ((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))