From: ueno Date: Sun, 12 Nov 2006 02:44:46 +0000 (+0000) Subject: * epa.el (epa-display-info): Generalized; renamed from X-Git-Tag: epg-0_0_8~26 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=519c1dac4e12c3fc245152ba976968640cc2811e;p=elisp%2Fepg.git * epa.el (epa-display-info): Generalized; renamed from epa-display-verify-result. (epa-decrypt-file): Use it. (epa-verify-file): Use it. (epa-decrypt-region): Use it. (epa-verify-region): Use it. (epa-import-keys): Show import result. --- diff --git a/ChangeLog b/ChangeLog index d312f87..ee35a6b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,13 @@ 2006-11-12 Daiki Ueno + * epa.el (epa-display-info): Generalized; renamed from + epa-display-verify-result. + (epa-decrypt-file): Use it. + (epa-verify-file): Use it. + (epa-decrypt-region): Use it. + (epa-verify-region): Use it. + (epa-import-keys): Show import result. + * epg.el (epg-start-sign-keys): Make it obsolete; signing a key is out of scope. (epg-sign-keys): Make it obsolete. diff --git a/epa.el b/epa.el index b8eb03a..9844b75 100644 --- a/epa.el +++ b/epa.el @@ -514,7 +514,7 @@ If SECRET is non-nil, list secret keys instead of public keys." (pop-to-buffer (current-buffer)) (epa-key-mode))) -(defun epa-display-verify-result (verify-result) +(defun epa-display-info (info) (if epa-popup-info-window (progn (unless epa-info-buffer @@ -524,13 +524,13 @@ If SECRET is non-nil, list secret keys instead of public keys." (let ((inhibit-read-only t) buffer-read-only) (erase-buffer) - (insert (epg-verify-result-to-string verify-result))) + (insert info)) (epa-info-mode)) (pop-to-buffer epa-info-buffer) (if (> (window-height) epa-info-window-height) (shrink-window (- (window-height) epa-info-window-height))) (goto-char (point-min))) - (message "%s" (epg-verify-result-to-string verify-result)))) + (message "%s" info))) (defun epa-passphrase-callback-function (context key-id handback) (if (eq key-id 'SYM) @@ -571,7 +571,8 @@ If SECRET is non-nil, list secret keys instead of public keys." (epg-decrypt-file context file plain) (message "Decrypting %s...done" (file-name-nondirectory file)) (if (epg-context-result-for context 'verify) - (epa-display-verify-result (epg-context-result-for context 'verify))))) + (epa-display-info (epg-verify-result-to-string + (epg-context-result-for context 'verify)))))) ;;;###autoload (defun epa-verify-file (file) @@ -586,7 +587,8 @@ If SECRET is non-nil, list secret keys instead of public keys." (epg-verify-file context file plain) (message "Verifying %s...done" (file-name-nondirectory file)) (if (epg-context-result-for context 'verify) - (epa-display-verify-result (epg-context-result-for context 'verify))))) + (epa-display-info (epg-verify-result-to-string + (epg-context-result-for context 'verify)))))) ;;;###autoload (defun epa-sign-file (file signers mode) @@ -658,7 +660,8 @@ Don't use this command in Lisp programs!" (goto-char start) (insert (decode-coding-string plain coding-system-for-read)) (if (epg-context-result-for context 'verify) - (epa-display-verify-result (epg-context-result-for context 'verify)))))) + (epa-display-info (epg-verify-result-to-string + (epg-context-result-for context 'verify))))))) ;;;###autoload (defun epa-decrypt-armor-in-region (start end) @@ -702,7 +705,8 @@ Don't use this command in Lisp programs!" (buffer-substring start end) coding-system-for-write)) (if (epg-context-result-for context 'verify) - (epa-display-verify-result (epg-context-result-for context 'verify))))) + (epa-display-info (epg-verify-result-to-string + (epg-context-result-for context 'verify)))))) ;;;###autoload (defun epa-verify-cleartext-in-region (start end) @@ -818,7 +822,9 @@ Don't use this command in Lisp programs!" (message "Importing %s..." (file-name-nondirectory file)) (epg-import-keys-from-file context (expand-file-name file)) (message "Importing %s...done" (file-name-nondirectory file)) - (apply #'epa-list-keys epa-list-keys-arguments))) + (if (epg-context-result-for context 'import) + (epa-display-info (epg-import-result-to-string + (epg-context-result-for context 'import))))) ;;;###autoload (defun epa-export-keys (keys file)