+2014-11-18 Daiki Ueno <ueno@gnu.org>
+
+ * epa-file.el (epa-file-insert-file-contents)
+ (epa-file-write-region): Remove redundant check of
+ epa-pinentry-mode.
+ * epa.el (epa-sign-file, epa-encrypt-file, epa-decrypt-region)
+ (epa-sign-region, epa-encrypt-region): Remove redundant check of
+ epa-pinentry-mode.
+
2014-11-18 Daiki Ueno <ueno@gnu.org>
* epa-file.el (epa-file-insert-file-contents): Don't show
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
(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
#'epa-progress-callback-function
(format "Signing %s..."
(file-name-nondirectory file))))
- (if epa-pinentry-mode
- (setf (epg-context-pinentry-mode context) epa-pinentry-mode))
+ (setf (epg-context-pinentry-mode context) epa-pinentry-mode)
(message "Signing %s..." (file-name-nondirectory file))
(condition-case error
(epg-sign-file context file signature mode)
#'epa-progress-callback-function
(format "Encrypting %s..."
(file-name-nondirectory file))))
- (if epa-pinentry-mode
- (setf (epg-context-pinentry-mode context) epa-pinentry-mode))
+ (setf (epg-context-pinentry-mode context) epa-pinentry-mode)
(message "Encrypting %s..." (file-name-nondirectory file))
(condition-case error
(epg-encrypt-file context file recipients cipher)
(cons
#'epa-progress-callback-function
"Decrypting..."))
- (if epa-pinentry-mode
- (setf (epg-context-pinentry-mode context) epa-pinentry-mode))
+ (setf (epg-context-pinentry-mode context) epa-pinentry-mode)
(message "Decrypting...")
(condition-case error
(setq plain (epg-decrypt-string context (buffer-substring start end)))
(cons
#'epa-progress-callback-function
"Signing..."))
- (if epa-pinentry-mode
- (setf (epg-context-pinentry-mode context) epa-pinentry-mode))
+ (setf (epg-context-pinentry-mode context) epa-pinentry-mode)
(message "Signing...")
(condition-case error
(setq signature (epg-sign-string context
(cons
#'epa-progress-callback-function
"Encrypting..."))
- (if epa-pinentry-mode
- (setf (epg-context-pinentry-mode context) epa-pinentry-mode))
+ (setf (epg-context-pinentry-mode context) epa-pinentry-mode)
(message "Encrypting...")
(condition-case error
(setq cipher (epg-encrypt-string context
;; (cons
;; #'epa-progress-callback-function
;; "Signing keys..."))
-;; (if epa-pinentry-mode
-;; (setf (epg-context-pinentry-mode context) epa-pinentry-mode))
+;; (setf (epg-context-pinentry-mode context) epa-pinentry-mode)
;; (message "Signing keys...")
;; (epg-sign-keys context keys local)
;; (message "Signing keys...done")))