summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.config/emacs/init.el28
1 files changed, 28 insertions, 0 deletions
diff --git a/.config/emacs/init.el b/.config/emacs/init.el
index 65634cb..c026dd7 100644
--- a/.config/emacs/init.el
+++ b/.config/emacs/init.el
@@ -58,6 +58,34 @@
;; General settings ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+(require 'mailcrypt)
+(mc-setversion "gpg")
+(add-hook 'wl-summary-mode-hook 'mc-install-read-mode)
+(add-hook 'wl-mail-setup-hook 'mc-install-write-mode)
+
+(defun mc-wl-verify-signature ()
+ (interactive)
+ (save-window-excursion
+ (wl-summary-jump-to-current-message)
+ (mc-verify)))
+
+(defun mc-wl-decrypt-message ()
+ (interactive)
+ (save-window-excursion
+ (wl-summary-jump-to-current-message)
+ (let ((inhibit-read-only t))
+ (mc-decrypt))))
+
+(eval-after-load "mailcrypt"
+ '(setq mc-modes-alist
+ (append
+ (quote
+ ((wl-draft-mode (encrypt . mc-encrypt-message)
+ (sign . mc-sign-message))
+ (wl-summary-mode (decrypt . mc-wl-decrypt-message)
+ (verify . mc-wl-verify-signature))))
+ mc-modes-alist)))
+
;(load "mdmua")
(load "emacsutils")