]> code.delx.au - gnu-emacs/blobdiff - lisp/epa-file.el
epg: Simplify epa-pinentry-mode handling
[gnu-emacs] / lisp / epa-file.el
index cdaa8ba5f3d457a1feba0e901403a5f3e58f41aa..2e46cf9da24d1131d72efc5d72383084f5b110a2 100644 (file)
@@ -144,8 +144,7 @@ encryption is used."
      context
      (cons #'epa-progress-callback-function
           (format "Decrypting %s" file)))
-    (if epa-pinentry-mode
-       (setf (epg-context-pinentry-mode context) epa-pinentry-mode))
+    (setf (epg-context-pinentry-mode context) epa-pinentry-mode)
     (unwind-protect
        (progn
          (if replace
@@ -233,8 +232,7 @@ encryption is used."
      (cons #'epa-progress-callback-function
           (format "Encrypting %s" file)))
     (setf (epg-context-armor context) epa-armor)
-    (if epa-pinentry-mode
-       (setf (epg-context-pinentry-mode context) epa-pinentry-mode))
+    (setf (epg-context-pinentry-mode context) epa-pinentry-mode)
     (condition-case error
        (setq string
              (epg-encrypt-string