]> code.delx.au - gnu-emacs/commitdiff
Simplify 2010-10-09T13:27:24Z!larsi@gnus.org.
authorDaiki Ueno <ueno@unixuser.org>
Sun, 10 Oct 2010 01:45:45 +0000 (10:45 +0900)
committerDaiki Ueno <ueno@unixuser.org>
Sun, 10 Oct 2010 01:45:45 +0000 (10:45 +0900)
* 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.

lisp/ChangeLog
lisp/epa-file.el
lisp/epa.el

index 330be221a600dbe6854b55c90744d5e6c23bd30c..f05defb968f7db51e6adf812c44b87195d6c90ef 100644 (file)
@@ -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)
index 3c6cf07ea1b61acc702f2e0018ca60c4b873a852..95d8423020b633fe34152375229f7b349ede94a9 100644 (file)
@@ -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)
index 49ff3455c2357d7cf7f3d2d8130a398e17f9e61f..ca0f07d5baef457472230f436f8ac4e62211e6ac 100644 (file)
@@ -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)