Function: epa-import-armor-in-region
epa-import-armor-in-region is an autoloaded, interactive and
byte-compiled function defined in epa.el.gz.
Signature
(epa-import-armor-in-region START END)
Documentation
Import keys in the OpenPGP armor format in the current region from START to END.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/epa.el.gz
;;;###autoload
(defun epa-import-armor-in-region (start end)
"Import keys in the OpenPGP armor format in the current region from START to END."
(interactive "r")
(save-excursion
(save-restriction
(narrow-to-region start end)
(goto-char start)
(let (armor-start armor-end)
(while (re-search-forward
"-----BEGIN \\(PGP \\(PUBLIC\\|PRIVATE\\) KEY BLOCK\\)-----$"
nil t)
(setq armor-start (match-beginning 0)
armor-end (re-search-forward
(concat "^-----END " (match-string 1) "-----$")
nil t))
(unless armor-end
(error "No armor tail"))
(epa-import-keys-region armor-start armor-end))))))