Function: epa--list-keys
epa--list-keys is a byte-compiled function defined in epa.el.gz.
Signature
(epa--list-keys NAME SECRET &optional DOC)
Documentation
NAME specifies which key to list.
SECRET says list data on the secret key (default, the public key). DOC is documentation text to insert at the start.
Source Code
;; Defined in /usr/src/emacs/lisp/epa.el.gz
(defun epa--list-keys (name secret &optional doc)
"NAME specifies which key to list.
SECRET says list data on the secret key (default, the public key).
DOC is documentation text to insert at the start."
(unless (and epa-keys-buffer
(buffer-live-p epa-keys-buffer))
(setq epa-keys-buffer (generate-new-buffer "*Keys*")))
(set-buffer epa-keys-buffer)
(epa-key-list-mode)
(let ((inhibit-read-only t)
buffer-read-only
(point (point-min))
(context (epg-make-context epa-protocol)))
;; Find the end of the documentation text at the start.
;; Set POINT to where it ends, or nil if ends at eob.
(unless (get-text-property point 'epa-key)
(setq point (next-single-property-change point 'epa-key)))
;; If caller specified documentation text for that, replace the old
;; documentation text (if any) with what was specified.
;; Otherwise, preserve whatever intro text is present.
(when doc
(if (or point (not (eobp)))
(delete-region (point-min) point))
(insert doc)
(setq point (point)))
;; Now delete the key description text, if any.
(when point
(delete-region point
(or (next-single-property-change point 'epa-list-keys)
(point-max)))
(goto-char point))
(epa--insert-keys (epg-list-keys context name secret)))
(setq-local epa-list-keys-arguments (list name secret))
(goto-char (point-min))
(pop-to-buffer (current-buffer)))