diff options
| author | Daiki Ueno | 2010-10-10 10:45:45 +0900 |
|---|---|---|
| committer | Daiki Ueno | 2010-10-10 10:45:45 +0900 |
| commit | 446b12da60f307f6be854cae341be194213a5ab1 (patch) | |
| tree | 42dd597c884e05f23ea2f5286bb4859cbfec4cfe /lisp | |
| parent | f7aa248a5b1ce15ac2a3b70b4a55833d9d1eb44b (diff) | |
| download | emacs-446b12da60f307f6be854cae341be194213a5ab1.tar.gz emacs-446b12da60f307f6be854cae341be194213a5ab1.zip | |
Simplify 2010-10-09T13:27:24Z!larsi@gnus.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.
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/ChangeLog | 7 | ||||
| -rw-r--r-- | lisp/epa-file.el | 5 | ||||
| -rw-r--r-- | lisp/epa.el | 10 |
3 files changed, 14 insertions, 8 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 330be221a60..f05defb968f 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,10 @@ | |||
| 1 | 2010-10-10 Daiki Ueno <ueno@unixuser.org> | ||
| 2 | |||
| 3 | * epa.el (epa-passphrase-callback-function): Display filename | ||
| 4 | passed as the 3rd arg. | ||
| 5 | * epa-file.el (epa-file-passphrase-callback-function): Pass | ||
| 6 | filename to epa-passphrase-callback-function. | ||
| 7 | |||
| 1 | 2010-10-09 Chong Yidong <cyd@stupidchicken.com> | 8 | 2010-10-09 Chong Yidong <cyd@stupidchicken.com> |
| 2 | 9 | ||
| 3 | * cus-edit.el (custom-face-widget-to-spec) | 10 | * cus-edit.el (custom-face-widget-to-spec) |
diff --git a/lisp/epa-file.el b/lisp/epa-file.el index 3c6cf07ea1b..95d8423020b 100644 --- a/lisp/epa-file.el +++ b/lisp/epa-file.el | |||
| @@ -67,10 +67,11 @@ way." | |||
| 67 | (cons entry | 67 | (cons entry |
| 68 | epa-file-passphrase-alist))) | 68 | epa-file-passphrase-alist))) |
| 69 | (setq passphrase (epa-passphrase-callback-function context | 69 | (setq passphrase (epa-passphrase-callback-function context |
| 70 | key-id nil)) | 70 | key-id |
| 71 | file)) | ||
| 71 | (setcdr entry (copy-sequence passphrase)) | 72 | (setcdr entry (copy-sequence passphrase)) |
| 72 | passphrase)))) | 73 | passphrase)))) |
| 73 | (epa-passphrase-callback-function context key-id nil))) | 74 | (epa-passphrase-callback-function context key-id file))) |
| 74 | 75 | ||
| 75 | ;;;###autoload | 76 | ;;;###autoload |
| 76 | (defun epa-file-handler (operation &rest args) | 77 | (defun epa-file-handler (operation &rest args) |
diff --git a/lisp/epa.el b/lisp/epa.el index 49ff3455c23..ca0f07d5bae 100644 --- a/lisp/epa.el +++ b/lisp/epa.el | |||
| @@ -637,12 +637,10 @@ If SECRET is non-nil, list secret keys instead of public keys." | |||
| 637 | (if (eq key-id 'SYM) | 637 | (if (eq key-id 'SYM) |
| 638 | (read-passwd | 638 | (read-passwd |
| 639 | (format "Passphrase for symmetric encryption%s: " | 639 | (format "Passphrase for symmetric encryption%s: " |
| 640 | (let ((elem (epg-context-passphrase-callback context))) | 640 | ;; Add the file name to the prompt, if any. |
| 641 | ;; Add the file name to the prompt, if any. | 641 | (if (stringp handback) |
| 642 | (if (and (consp elem) | 642 | (format " for %s" handback) |
| 643 | (stringp (cdr elem))) | 643 | "")) |
| 644 | (format " for %s" (cdr elem)) | ||
| 645 | ""))) | ||
| 646 | (eq (epg-context-operation context) 'encrypt)) | 644 | (eq (epg-context-operation context) 'encrypt)) |
| 647 | (read-passwd | 645 | (read-passwd |
| 648 | (if (eq key-id 'PIN) | 646 | (if (eq key-id 'PIN) |