* pgg-epg.el (pgg-epg-decrypt-region): Don't call
[elisp/epg.git] / epg.el
diff --git a/epg.el b/epg.el
index 2aaa58f..515110f 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