summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lisp/ChangeLog7
-rw-r--r--lisp/epa-file.el5
-rw-r--r--lisp/epa.el10
3 files changed, 14 insertions, 8 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index b4722aa2a55..7ed797223b9 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,10 @@
+2010-10-10 Daiki Ueno <ueno@unixuser.org>
+
+ * epa.el (epa-passphrase-callback-function): Display filename
+ passed as the 3rd arg.
+ * epa-file.el (epa-file-passphrase-callback-function): Pass
+ filename to epa-passphrase-callback-function.
+
2010-10-09 Chong Yidong <cyd@stupidchicken.com>
* cus-edit.el (custom-face-widget-to-spec)
diff --git a/lisp/epa-file.el b/lisp/epa-file.el
index 3c6cf07ea1b..95d8423020b 100644
--- a/lisp/epa-file.el
+++ b/lisp/epa-file.el
@@ -67,10 +67,11 @@ way."
(cons entry
epa-file-passphrase-alist)))
(setq passphrase (epa-passphrase-callback-function context
- key-id nil))
+ key-id
+ file))
(setcdr entry (copy-sequence passphrase))
passphrase))))
- (epa-passphrase-callback-function context key-id nil)))
+ (epa-passphrase-callback-function context key-id file)))
;;;###autoload
(defun epa-file-handler (operation &rest args)
diff --git a/lisp/epa.el b/lisp/epa.el
index 49ff3455c23..ca0f07d5bae 100644
--- a/lisp/epa.el
+++ b/lisp/epa.el
@@ -637,12 +637,10 @@ If SECRET is non-nil, list secret keys instead of public keys."
(if (eq key-id 'SYM)
(read-passwd
(format "Passphrase for symmetric encryption%s: "
- (let ((elem (epg-context-passphrase-callback context)))
- ;; Add the file name to the prompt, if any.
- (if (and (consp elem)
- (stringp (cdr elem)))
- (format " for %s" (cdr elem))
- "")))
+ ;; Add the file name to the prompt, if any.
+ (if (stringp handback)
+ (format " for %s" handback)
+ ""))
(eq (epg-context-operation context) 'encrypt))
(read-passwd
(if (eq key-id 'PIN)