Revert "mu4e: add evil-mu4e package."

This reverts commit 3cb341bf71.

We should be able to dynamically switch between editing styles so evil-mu4e must
be able to revert its changes. For instance you start Emacs in Vim style and
have evil-mu4e activated then when you switch to Emacs style evil-mu4e should
revert its changes. See evil-magit for inspiration on how to do it.

Evilified maps supports hot switching of editing style out of the box.
This commit is contained in:
syl20bnr 2018-01-19 23:57:28 -05:00
parent 3cb341bf71
commit f55b62543b
2 changed files with 33 additions and 7 deletions

View File

@ -71,7 +71,6 @@ existing =dotspacemacs-configuration-layers= list in this file.
| Keybinding | Command |
|------------+-------------------------------------------------------------|
| ~J~ | Go to next unread thread marking other mail read on the way |
| ~T~ | Go to next unread thread marking other mail read on the way |
| ~C-j~ | Next header |
| ~C-k~ | Previous header |
@ -80,7 +79,6 @@ existing =dotspacemacs-configuration-layers= list in this file.
| Keybinding | Command |
|------------+-------------------------------------------------------------|
| ~J~ | Go to next unread thread marking other mail read on the way |
| ~T~ | Go to next unread thread marking other mail read on the way |
| ~C-j~ | Next header |
| ~C-k~ | Previous header |

View File

@ -17,7 +17,6 @@
(helm-mu :requires helm)
org
persp-mode
evil-mu4e
))
(defun mu4e/post-init-persp-mode ()
@ -54,6 +53,39 @@
:config
(progn
(evilified-state-evilify-map mu4e-main-mode-map
:mode mu4e-main-mode
:bindings
(kbd "j") 'mu4e~headers-jump-to-maildir)
(evilified-state-evilify-map
mu4e-headers-mode-map
:mode mu4e-headers-mode
:bindings
(kbd "C-j") 'mu4e-headers-next
(kbd "C-k") 'mu4e-headers-prev
(kbd "J") (lambda ()
(interactive)
(mu4e-headers-mark-thread nil '(read))))
(evilified-state-evilify-map
mu4e-view-mode-map
:mode mu4e-view-mode
:bindings
(kbd "C-j") 'mu4e-view-headers-next
(kbd "C-k") 'mu4e-view-headers-prev
(kbd "J") (lambda ()
(interactive)
(mu4e-view-mark-thread '(read))))
(spacemacs/set-leader-keys-for-major-mode 'mu4e-compose-mode
dotspacemacs-major-mode-leader-key 'message-send-and-exit
"c" 'message-send-and-exit
"k" 'message-kill-buffer
"a" 'message-kill-buffer
"s" 'message-dont-send ; saves as draft
"f" 'mml-attach-file)
(when mu4e-enable-async-operations
(require 'smtpmail-async)
(setq send-mail-function 'async-smtpmail-send-it
@ -99,7 +131,3 @@ mu4e-use-maildirs-extension-load to be evaluated after mu4e has been loaded."
(defun mu4e/pre-init-org ()
;; load org-mu4e when org is actually loaded
(with-eval-after-load 'org (require 'org-mu4e nil 'noerror)))
(defun mu4e/init-evil-mu4e()
(use-package evil-mu4e
:after mu4e))