(epa-select-keys): Simplified.
authorueno <ueno>
Mon, 10 Jul 2006 01:21:47 +0000 (01:21 +0000)
committerueno <ueno>
Mon, 10 Jul 2006 01:21:47 +0000 (01:21 +0000)
epa.el

diff --git a/epa.el b/epa.el
index e29441e..9f40af6 100644 (file)
--- a/epa.el
+++ b/epa.el
@@ -363,8 +363,7 @@ If SECRET is non-nil, list secret keys instead of public keys."
                 (buffer-live-p epa-keys-buffer))
       (setq epa-keys-buffer (generate-new-buffer "*Keys*")))
     (let ((inhibit-read-only t)
-         buffer-read-only
-         point)
+         buffer-read-only)
       (set-buffer epa-keys-buffer)
       (erase-buffer)
       (insert prompt "\n")
@@ -383,30 +382,28 @@ If SECRET is non-nil, list secret keys instead of public keys."
       (insert "\n\n")
       (if names
          (while names
-           (setq point (point))
            (epa-insert-keys context (car names) secret)
-           (goto-char point)
-           (epa-mark)
+           (if (get-text-property (point) 'epa-list-keys)
+               (epa-mark))
            (goto-char (point-max))
            (setq names (cdr names)))
        (if secret
            (progn
-             (setq point (point))
              (epa-insert-keys context nil secret)
-             (goto-char point)
-             (epa-mark))
+             (if (get-text-property (point) 'epa-list-keys)
+                 (epa-mark)))
          (epa-insert-keys context nil nil)))
       (epa-keys-mode)
       (setq epa-exit-buffer-function #'abort-recursive-edit)
       (goto-char (point-min))
       (pop-to-buffer (current-buffer)))
     (unwind-protect
-         (progn
-           (recursive-edit)
-           (epa-marked-keys))
-       (if (get-buffer-window epa-keys-buffer)
-           (delete-window (get-buffer-window epa-keys-buffer)))
-       (kill-buffer epa-keys-buffer))))
+       (progn
+         (recursive-edit)
+         (epa-marked-keys))
+      (if (get-buffer-window epa-keys-buffer)
+         (delete-window (get-buffer-window epa-keys-buffer)))
+      (kill-buffer epa-keys-buffer))))
 
 (defun epa-show-key (key)
   (let* ((primary-sub-key (car (epg-key-sub-key-list key)))