diff options
| author | Dario Klingenberg <dario.klingenberg@web.de> | 2020-06-07 17:34:20 +0200 |
|---|---|---|
| committer | Pierre Neidhardt <mail@ambrevar.xyz> | 2020-06-08 08:57:05 +0200 |
| commit | 120608be933295f1ce903771edef03930ab40bbf (patch) | |
| tree | 853a7edae83acfaf1e9349a933d8987e0b3375dc /modes/mu4e | |
| parent | 4f37e48203064a9dbccb7957cf437ef8ab43ed95 (diff) | |
move hooks into evil-collection-mu4e-setup
Diffstat (limited to 'modes/mu4e')
| -rw-r--r-- | modes/mu4e/evil-collection-mu4e.el | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/modes/mu4e/evil-collection-mu4e.el b/modes/mu4e/evil-collection-mu4e.el index 8aba94d..ea62da1 100644 --- a/modes/mu4e/evil-collection-mu4e.el +++ b/modes/mu4e/evil-collection-mu4e.el @@ -91,20 +91,14 @@ ;; When using org-mu4e, the above leads to an annoying behaviour, because ;; switching from message body to header activates mu4e-compose-mode, thus -;; putting the user into insert-state. The below code fixes this issue. +;; putting the user into insert-state. The below code, together with the hooks +;; set in evil-collection-mu4e-setup fixes this issue. (defun evil-collection-mu4e-org-set-header-to-normal-mode () (evil-set-initial-state 'mu4e-compose-mode 'normal)) (defun evil-collection-mu4e-org-set-header-to-insert-mode () (evil-set-initial-state 'mu4e-compose-mode 'insert)) -(add-hook 'org-mode-hook - #'evil-collection-mu4e-org-set-header-to-normal-mode) - -(add-hook 'mu4e-compose-pre-hook - #'evil-collection-mu4e-org-set-header-to-insert-mode) - - ;;; Define bindings @@ -347,7 +341,9 @@ If mu4e-main-mode is in evil-state-motion-modes, initialization is already done earlier." (evil-collection-mu4e-set-state) (evil-collection-mu4e-set-bindings) - (add-hook 'mu4e-main-mode-hook 'evil-collection-mu4e-update-main-view)) + (add-hook 'mu4e-main-mode-hook 'evil-collection-mu4e-update-main-view) + (add-hook 'org-mode-hook #'evil-collection-mu4e-org-set-header-to-normal-mode) + (add-hook 'mu4e-compose-pre-hook #'evil-collection-mu4e-org-set-header-to-insert-mode)) (provide 'evil-collection-mu4e) ;;; evil-collection-mu4e.el ends here |
