(let ((inhibit-read-only t)
buffer-read-only
keys point primary-sub-key primary-user-id)
- (setq keys (epg-list-keys))
+ (setq keys (epg-list-keys name))
(while keys
(setq point (point)
primary-sub-key (car (epg-key-sub-key-list (car keys)))
(buffer-live-p epa-keys-buffer))
(setq epa-keys-buffer (generate-new-buffer "*Keys*")))
(let ((inhibit-read-only t)
- buffer-read-only)
+ buffer-read-only
+ point)
(set-buffer epa-keys-buffer)
(erase-buffer)
(insert prompt "\n\n"
"\n\n")
(if names
(while names
+ (setq point (point))
(epa-list-keys-1 (car names))
+ (goto-char point)
+ (epa-mark)
+ (goto-char (point-max))
(setq names (cdr names)))
(epa-list-keys-1 nil))
(epa-keys-mode)
(setq keys (cons key keys))))
(nreverse keys))))
(if (get-buffer-window epa-keys-buffer)
- (delete-window (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)))
(defun epa-show-key-notify (widget &rest ignore)
(epa-show-key (widget-value widget)))
-(defun epa-mark ()
+(defun epa-mark (&optional arg)
"Mark the current line."
- (interactive)
+ (interactive "P")
(let ((inhibit-read-only t)
buffer-read-only
properties)
(beginning-of-line)
(setq properties (text-properties-at (point)))
(delete-char 1)
- (insert "*")
+ (insert (if arg " " "*"))
(set-text-properties (1- (point)) (point) properties)
(forward-line)))
-(defun epa-unmark ()
+(defun epa-unmark (&optional arg)
"Unmark the current line."
- (interactive)
- (let ((inhibit-read-only t)
- buffer-read-only
- properties)
- (beginning-of-line)
- (setq properties (text-properties-at (point)))
- (delete-char 1)
- (insert " ")
- (set-text-properties (1- (point)) (point) properties)
- (forward-line)))
+ (interactive "P")
+ (epa-mark (not arg)))
(provide 'epa)