From: ueno Date: Sun, 12 Nov 2006 05:44:26 +0000 (+0000) Subject: (epa-popup-info-window): Turn on by default. X-Git-Tag: epg-0_0_8~21 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e4ffb66b72b16693eea94572951cae90d58d703e;p=elisp%2Fepg.git (epa-popup-info-window): Turn on by default. (epa-display-info): Split selected window instead of pop-to-buffer. --- diff --git a/ChangeLog b/ChangeLog index c49221e..5cfcd28 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2006-11-12 Daiki Ueno + * epa.el (epa-popup-info-window): Turn on by default. + (epa-display-info): Split selected window instead of pop-to-buffer. + +2006-11-12 Daiki Ueno + * epa.el (epa-display-info): Generalized; renamed from epa-display-verify-result. (epa-decrypt-file): Use it. diff --git a/epa.el b/epa.el index 948cf8f..bff4769 100644 --- a/epa.el +++ b/epa.el @@ -42,7 +42,7 @@ :type 'boolean :group 'epa) -(defcustom epa-popup-info-window nil +(defcustom epa-popup-info-window t "If non-nil, status information from epa commands is displayed on the separate window." :type 'boolean @@ -516,7 +516,7 @@ If SECRET is non-nil, list secret keys instead of public keys." (defun epa-display-info (info) (if epa-popup-info-window - (progn + (save-window-excursion (unless epa-info-buffer (setq epa-info-buffer (generate-new-buffer "*Info*"))) (save-excursion @@ -525,11 +525,16 @@ If SECRET is non-nil, list secret keys instead of public keys." buffer-read-only) (erase-buffer) (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))) + (epa-info-mode) + (goto-char (point-min))) + (if (> (window-height) + epa-info-window-height) + (set-window-buffer (split-window nil (- (window-height) + epa-info-window-height)) + epa-info-buffer) + (pop-to-buffer epa-info-buffer) + (if (> (window-height) epa-info-window-height) + (shrink-window (- (window-height) epa-info-window-height))))) (message "%s" info))) (defun epa-display-verify-result (verify-result) @@ -832,7 +837,9 @@ Don't use this command in Lisp programs!" (message "Importing %s...failed" (file-name-nondirectory file)))) (if (epg-context-result-for context 'import) (epa-display-info (epg-import-result-to-string - (epg-context-result-for context 'import)))))) + (epg-context-result-for context 'import)))) + (if (eq major-mode 'epa-keys-mode) + (apply #'epa-list-keys epa-list-keys-arguments)))) ;;;###autoload (defun epa-export-keys (keys file)