# HG changeset patch # User Daiki Ueno # Date 1286675145 -32400 # Node ID beddb591d1824feeb06cac5902973b47af6469fc # Parent 069deed4cdec2793573d36b64b9e4dcf7ecc771a Simplify r101871. * 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. diff -r 069deed4cdec -r beddb591d182 lisp/ChangeLog --- a/lisp/ChangeLog Sun Oct 10 00:15:21 2010 +0000 +++ b/lisp/ChangeLog Sun Oct 10 10:45:45 2010 +0900 @@ -1,3 +1,10 @@ +2010-10-10 Daiki Ueno + + * 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 * cus-edit.el (custom-face-widget-to-spec) diff -r 069deed4cdec -r beddb591d182 lisp/epa-file.el --- a/lisp/epa-file.el Sun Oct 10 00:15:21 2010 +0000 +++ b/lisp/epa-file.el Sun Oct 10 10:45:45 2010 +0900 @@ -67,10 +67,11 @@ (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 -r 069deed4cdec -r beddb591d182 lisp/epa.el --- a/lisp/epa.el Sun Oct 10 00:15:21 2010 +0000 +++ b/lisp/epa.el Sun Oct 10 10:45:45 2010 +0900 @@ -637,12 +637,10 @@ (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)