2006-11-12 Daiki Ueno <ueno@unixuser.org>
+ * 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.
(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
(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)
(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)
(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)
(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)
(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)
(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)