[notmuch] Refactor window-purpose config
Refactor window-purpose config to use extension-configuration rather than user-configuration to allow reconfiguration in user-config.
This commit is contained in:
parent
4f9fdb0664
commit
8ac0edc297
|
@ -1,6 +1,6 @@
|
|||
;;; config.el --- notmuch Layer configuration File for Spacemacs
|
||||
;;
|
||||
;; Copyright (c) 2012-2018 Sylvain Benner & Contributors
|
||||
;; Copyright (c) 2012-2020 Sylvain Benner & Contributors
|
||||
;;
|
||||
;; Author: Miciah Dashiel Butler Masters <miciah.masters@gmail.com>
|
||||
;; URL: https://github.com/syl20bnr/spacemacs
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
;;; funcs.el --- Notmuch Layer functions File for Spacemacs
|
||||
;;
|
||||
;; Copyright (c) 2012-2018 Sylvain Benner & Contributors
|
||||
;; Copyright (c) 2012-2020 Sylvain Benner & Contributors
|
||||
;;
|
||||
;; Author: Sylvain Benner <sylvain.benner@gmail.com>
|
||||
;; URL: https://github.com/syl20bnr/spacemacs
|
||||
|
@ -35,7 +35,7 @@
|
|||
(defun spacemacs//notmuch-message-delete (go-next)
|
||||
"Delete message and select GO-NEXT message."
|
||||
(notmuch-search-tag notmuch-message-deleted-tags)
|
||||
(if (eq 'up go-next )
|
||||
(if (eq 'up go-next)
|
||||
(notmuch-search-previous-thread)
|
||||
(notmuch-search-next-thread)))
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
;;; packages.el --- Notmuch Layer packages File for Spacemacs
|
||||
;;
|
||||
;; Copyright (c) 2012-2018 Sylvain Benner & Contributors
|
||||
;; Copyright (c) 2012-2020 Sylvain Benner & Contributors
|
||||
;;
|
||||
;; Author: Sylvain Benner <sylvain.benner@gmail.com>
|
||||
;; URL: https://github.com/syl20bnr/spacemacs
|
||||
|
@ -9,14 +9,14 @@
|
|||
;;
|
||||
;;; License: GPLv3
|
||||
|
||||
(setq notmuch-packages
|
||||
'(
|
||||
(counsel-notmuch :requires ivy)
|
||||
(helm-notmuch :requires helm)
|
||||
notmuch
|
||||
org
|
||||
persp-mode
|
||||
window-purpose))
|
||||
(defconst notmuch-packages
|
||||
'(
|
||||
(counsel-notmuch :requires ivy)
|
||||
(helm-notmuch :requires helm)
|
||||
notmuch
|
||||
org
|
||||
persp-mode
|
||||
window-purpose))
|
||||
|
||||
|
||||
(defun notmuch/init-counsel-notmuch ()
|
||||
|
@ -154,8 +154,10 @@
|
|||
(add-hook hook #'spacemacs//notmuch-buffer-to-persp)))
|
||||
(call-interactively 'notmuch))))))
|
||||
|
||||
(defun notmuch/pre-init-window-purpose ()
|
||||
(spacemacs|use-package-add-hook window-purpose
|
||||
:pre-config
|
||||
(defun notmuch/post-init-window-purpose ()
|
||||
(let ((modes))
|
||||
(dolist (mode notmuch-modes)
|
||||
(add-to-list 'purpose-user-mode-purposes (cons mode 'mail)))))
|
||||
(add-to-list 'modes (cons mode 'mail)))
|
||||
(purpose-set-extension-configuration
|
||||
:notmuch-layer
|
||||
(purpose-conf :mode-purposes modes))))
|
||||
|
|
Loading…
Reference in a new issue