mirror of
https://github.com/correl/doom-modeline.git
synced 2024-11-27 11:09:52 +00:00
Fix: restore mu4e-alert-modeline-formatter to last one.
This commit is contained in:
parent
4f856886d6
commit
66b182a9fd
1 changed files with 7 additions and 6 deletions
|
@ -154,8 +154,9 @@ If DEFAULT is non-nil, set the default mode-line for all buffers."
|
|||
;;
|
||||
|
||||
(defvar doom-modeline--default-mode-line mode-line-format)
|
||||
|
||||
(defvar mu4e-alert-modeline-formatter)
|
||||
(declare-function mu4e-alert-default-mode-line-formatter 'mu4e-alert)
|
||||
(defvar doom-modeline--mu4e-alert-modeline-formatter mu4e-alert-modeline-formatter)
|
||||
|
||||
;;;###autoload
|
||||
(define-minor-mode doom-modeline-mode
|
||||
|
@ -173,22 +174,22 @@ If DEFAULT is non-nil, set the default mode-line for all buffers."
|
|||
(dolist (bname '("*scratch*" "*Messages*"))
|
||||
(with-current-buffer bname
|
||||
(doom-modeline-set-main-modeline))))
|
||||
;; Set mu4e alert modeline
|
||||
(if doom-modeline-mu4e (setq mu4e-alert-modeline-formatter #'identity))
|
||||
;; Add hooks
|
||||
(add-hook 'dashboard-mode-hook #'doom-modeline-set-project-modeline)
|
||||
(add-hook 'image-mode-hook #'doom-modeline-set-media-modeline)
|
||||
(add-hook 'circe-mode-hook #'doom-modeline-set-special-modeline)
|
||||
(add-hook 'pdf-tools-enabled-hook #'doom-modeline-set-pdf-modeline)
|
||||
(setq mu4e-alert-modeline-formatter #'identity))
|
||||
(add-hook 'pdf-tools-enabled-hook #'doom-modeline-set-pdf-modeline))
|
||||
(progn
|
||||
;; Restore mode-line
|
||||
(setq-default mode-line-format doom-modeline--default-mode-line)
|
||||
(setq mu4e-alert-modeline-formatter doom-modeline--mu4e-alert-modeline-formatter)
|
||||
;; Remove hooks
|
||||
(remove-hook 'dashboard-mode-hook #'doom-modeline-set-project-modeline)
|
||||
(remove-hook 'image-mode-hook #'doom-modeline-set-media-modeline)
|
||||
(remove-hook 'circe-mode-hook #'doom-modeline-set-special-modeline)
|
||||
(remove-hook 'pdf-tools-enabled-hook #'doom-modeline-set-pdf-modeline)
|
||||
(setq mu4e-alert-modeline-formatter
|
||||
#'mu4e-alert-default-mode-line-formatter))))
|
||||
(remove-hook 'pdf-tools-enabled-hook #'doom-modeline-set-pdf-modeline))))
|
||||
|
||||
(provide 'doom-modeline)
|
||||
|
||||
|
|
Loading…
Reference in a new issue