summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorrekado <rekado@elephly.net>2016-11-23 22:43:07 +0100
committerrekado <rekado@elephly.net>2016-11-23 22:43:07 +0100
commit1e3dd8ae1c80e5f5c1b45baff461058601aa357c (patch)
tree8b4f016c745c415eb32b616998d5b0e88e7d23e7 /lisp
parentbe1cb8db0d0ffb4db98589432e81ae4ee643ca2a (diff)
email: Encrypt replies containing PGP marker.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/email.el5
1 files changed, 4 insertions, 1 deletions
diff --git a/lisp/email.el b/lisp/email.el
index 735588b..5f1ccd9 100644
--- a/lisp/email.el
+++ b/lisp/email.el
@@ -113,7 +113,10 @@
(defun my/maybe-reply-encrypted ()
"Encrypt automatically if parent message was also encrypted."
(let ((msg mu4e-compose-parent-message))
- (when (and msg (member 'encrypted (mu4e-message-field msg :flags)))
+ (when (and msg
+ (or (member 'encrypted (mu4e-message-field msg :flags))
+ (string-match "-----BEGIN PGP MESSAGE-----$"
+ (mu4e-message-field msg :body-txt))))
(mml-secure-message-sign-encrypt)))))
(add-hook 'mu4e-view-mode-hook