diff options
author | Jonas Bernoulli <jonas@bernoul.li> | 2020-02-18 16:42:20 +0100 |
---|---|---|
committer | Jonas Bernoulli <jonas@bernoul.li> | 2020-08-13 11:30:16 +0200 |
commit | c5b9d2a4b46c6da7d5c88a8c51be5294b2d5edc9 (patch) | |
tree | bbf9766ac030de9573e49a3f2862d9e4386ca03a /lisp/epa-mail.el | |
parent | 562bbd0a367b8d4239215c70f8548fed5ab47bac (diff) | |
download | emacs-c5b9d2a4b46c6da7d5c88a8c51be5294b2d5edc9.tar.gz |
Split EasyPG libraries into outline sections
* lisp/epa-dired.el:
lisp/epa-file.el:
lisp/epa-hook.el:
lisp/epa-mail.el:
lisp/epa.el:
lisp/epg-config.el:
lisp/epg.el: Split into outline sections.
* lisp/epg.el (epg-error): Move definition.
Diffstat (limited to 'lisp/epa-mail.el')
-rw-r--r-- | lisp/epa-mail.el | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lisp/epa-mail.el b/lisp/epa-mail.el index 63475256ca8..6e6c0a498d2 100644 --- a/lisp/epa-mail.el +++ b/lisp/epa-mail.el @@ -1,4 +1,5 @@ ;;; epa-mail.el --- the EasyPG Assistant, minor-mode for mail composer -*- lexical-binding: t -*- + ;; Copyright (C) 2006-2020 Free Software Foundation, Inc. ;; Author: Daiki Ueno <ueno@unixuser.org> @@ -21,10 +22,13 @@ ;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. ;;; Code: +;;; Dependencies (require 'epa) (require 'mail-utils) +;;; Local Mode + (defvar epa-mail-mode-map (let ((keymap (make-sparse-keymap))) (define-key keymap "\C-c\C-ed" 'epa-mail-decrypt) @@ -50,6 +54,8 @@ "A minor-mode for composing encrypted/clearsigned mails." nil " epa-mail" epa-mail-mode-map) +;;; Utilities + (defun epa-mail--find-usable-key (keys usage) "Find a usable key from KEYS for USAGE. USAGE would be `sign' or `encrypt'." @@ -64,6 +70,8 @@ USAGE would be `sign' or `encrypt'." (setq pointer (cdr pointer)))) (setq keys (cdr keys))))) +;;; Commands + ;;;###autoload (defun epa-mail-decrypt () "Decrypt OpenPGP armors in the current buffer. @@ -241,6 +249,8 @@ The buffer is expected to contain a mail message." (interactive) (epa-import-armor-in-region (point-min) (point-max))) +;;; Global Mode + ;;;###autoload (define-minor-mode epa-global-mail-mode "Minor mode to hook EasyPG into Mail mode." |