Update.
[elisp/epg.git] / epg.el
diff --git a/epg.el b/epg.el
index 2aaa58f..e445aec 100644 (file)
--- a/epg.el
+++ b/epg.el
@@ -1222,7 +1222,7 @@ This function is for internal use only."
                  (if epg-passphrase-coding-system
                      (progn
                        (setq encoded-passphrase-with-new-line
-                             (encode-coding-string
+                             (epg--encode-coding-string
                               passphrase-with-new-line
                               (coding-system-change-eol-conversion
                                epg-passphrase-coding-system 'unix)))
@@ -1800,6 +1800,10 @@ You can then use `write-region' to write new data into the file."
   (defun epg--clear-string (string)
     (fillarray string 0)))
 
+(if (fboundp 'encode-coding-string)
+    (defalias 'epg--encode-coding-string 'encode-coding-string)
+  (defalias 'epg--encode-coding-string 'identity))
+
 (defun epg--args-from-sig-notations (notations)
   (apply #'nconc
         (mapcar
@@ -2220,7 +2224,7 @@ If you are unsure, use synchronous version of this function
   "Extract public KEYS."
   (unwind-protect
       (progn
-       (if keys
+       (if file
            (epg-context-set-output-file context file)
          (epg-context-set-output-file context
                                       (epg--make-temp-file "epg-output")))