diff options
Diffstat (limited to 'lisp/epa.el')
-rw-r--r-- | lisp/epa.el | 11 |
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: " |