summaryrefslogtreecommitdiff
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
parentcf321e508bb17e6339b3482d9484cd12244c6433 (diff)
downloademacs-7450df5dfcac171bae556c26261ab2873573f34c.tar.gz
emacs-7450df5dfcac171bae556c26261ab2873573f34c.tar.bz2
emacs-7450df5dfcac171bae556c26261ab2873573f34c.zip
(epa-passphrase-callback-function): Say what we're querying the password for.
-rw-r--r--lisp/ChangeLog3
-rw-r--r--lisp/epa.el11
2 files changed, 12 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 1b38724aa87..3679a448430 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,8 @@
2010-10-09 Lars Magne Ingebrigtsen <larsi@gnus.org>
+ * epa.el (epa-passphrase-callback-function): Say what we're
+ querying the password for.
+
* ibuffer.el (ibuffer-visit-buffer): To mimick list-buffers
behaviour, don't bury the ibuffer buffer when visiting other
buffers.
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: "