summaryrefslogtreecommitdiff
path: root/.config/emacs/init.el
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2013-01-04 10:44:44 -0500
committerLuke Shumaker <LukeShu@sbcglobal.net>2013-01-04 10:44:44 -0500
commit6c00940af5265238bbeae7efce8e334d92771848 (patch)
tree86cd843e5d5b9a8d7468db86a160a10c7fed75da /.config/emacs/init.el
parent2b4d180dc87571e8650f4d7998f98b69b4519ee9 (diff)
use mailcrypt with wanderlust
Diffstat (limited to '.config/emacs/init.el')
-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")