diff options
author | Lars Ingebrigtsen <larsi@gnus.org> | 2020-12-12 21:19:26 +0100 |
---|---|---|
committer | Lars Ingebrigtsen <larsi@gnus.org> | 2020-12-12 21:19:26 +0100 |
commit | 180e309d8b15b66b588438d157ed1290ab2de7df (patch) | |
tree | 581c893bd72d42447b648faa49b337b01ce11f18 /lisp/mail/rmail.el | |
parent | 8a220d7c8f30fda7239c1dbf7522e0170ef53527 (diff) | |
download | emacs-180e309d8b15b66b588438d157ed1290ab2de7df.tar.gz emacs-180e309d8b15b66b588438d157ed1290ab2de7df.tar.bz2 emacs-180e309d8b15b66b588438d157ed1290ab2de7df.zip |
Bind `C-c C-d' to rmail-epa-decrypt in rmail
* doc/emacs/rmail.texi (Rmail Display): Mention the key
binding (bug#25411).
* lisp/mail/rmail.el (rmail-mode-map): Bind C-c C-d to
rmail-epa-decrypt.
(rmail-mode): Mention it.
(rmail-epa-decrypt): Don't mark a mail as decrypted unless we're
replacing it.
* lisp/mail/rmailsum.el (rmail-summary-mode-map): Bind C-c C-d.
(rmail-summary-epa-decrypt): New command.
Diffstat (limited to 'lisp/mail/rmail.el')
-rw-r--r-- | lisp/mail/rmail.el | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el index 63d992d2717..3c74edd1054 100644 --- a/lisp/mail/rmail.el +++ b/lisp/mail/rmail.el @@ -1080,6 +1080,7 @@ The buffer is expected to be narrowed to just the header of the message." (define-key map [?\S-\ ] 'scroll-down-command) (define-key map "\177" 'scroll-down-command) (define-key map "?" 'describe-mode) + (define-key map "\C-c\C-d" 'rmail-epa-decrypt) (define-key map "\C-c\C-s\C-d" 'rmail-sort-by-date) (define-key map "\C-c\C-s\C-s" 'rmail-sort-by-subject) (define-key map "\C-c\C-s\C-a" 'rmail-sort-by-author) @@ -1272,6 +1273,7 @@ Instead, these commands are available: \\[rmail-undelete-previous-message] Undelete message. Tries current message, then earlier messages till a deleted message is found. \\[rmail-edit-current-message] Edit the current message. \\[rmail-cease-edit] to return to Rmail. +\\[rmail-epa-decrypt] Decrypt the current message. \\[rmail-expunge] Expunge deleted messages. \\[rmail-expunge-and-save] Expunge and save the file. \\[rmail-quit] Quit Rmail: expunge, save, then switch to another buffer. @@ -4610,11 +4612,10 @@ Argument MIME is non-nil if this is a mime message." "> ") (push (rmail-epa-decrypt-1 mime) decrypts)))) - (when (and decrypts (eq major-mode 'rmail-mode)) - (rmail-add-label "decrypt")) - (when (and decrypts (rmail-buffers-swapped-p)) (when (y-or-n-p "Replace the original message? ") + (when (eq major-mode 'rmail-mode) + (rmail-add-label "decrypt")) (setq decrypts (nreverse decrypts)) (let ((beg (rmail-msgbeg rmail-current-message)) (end (rmail-msgend rmail-current-message))) |