summaryrefslogtreecommitdiff
path: root/lisp/epa.el
diff options
context:
space:
mode:
authorLars Magne Ingebrigtsen <larsi@gnus.org>2010-10-09 15:27:24 +0200
committerLars Magne Ingebrigtsen <larsi@gnus.org>2010-10-09 15:27:24 +0200
commit7450df5dfcac171bae556c26261ab2873573f34c (patch)
tree891a28f178f2260b874303b6474c8559efb81a3e /lisp/epa.el
parentcf321e508bb17e6339b3482d9484cd12244c6433 (diff)
downloademacs-7450df5dfcac171bae556c26261ab2873573f34c.tar.gz
(epa-passphrase-callback-function): Say what we're querying the password for.
Diffstat (limited to 'lisp/epa.el')
-rw-r--r--lisp/epa.el11
1 files changed, 9 insertions, 2 deletions
diff --git a/lisp/epa.el b/lisp/epa.el
index 8d77d6938b1..49ff3455c23 100644
--- a/lisp/epa.el
+++ b/lisp/epa.el
@@ -635,8 +635,15 @@ If SECRET is non-nil, list secret keys instead of public keys."
(defun epa-passphrase-callback-function (context key-id handback)
(if (eq key-id 'SYM)
- (read-passwd "Passphrase for symmetric encryption: "
- (eq (epg-context-operation context) 'encrypt))
+ (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))
+ "")))
+ (eq (epg-context-operation context) 'encrypt))
(read-passwd
(if (eq key-id 'PIN)
"Passphrase for PIN: "