Revert "fix mu4e-alert-mode-line numberp error"

This reverts commit b29ce18e68.
This commit is contained in:
yqrashawn 2019-03-04 11:31:51 +08:00
parent 59047842b0
commit 66779bcb17

View file

@ -1586,28 +1586,26 @@ mouse-1: Toggle Debug on Quit"
(doom-modeline--active) (doom-modeline--active)
(bound-and-true-p mu4e-alert-mode-line)) (bound-and-true-p mu4e-alert-mode-line))
;; don't display if the unread mails count is zero ;; don't display if the unread mails count is zero
(mu4e-alert--get-mu-unread-mails (if (> mu4e-alert-mode-line 0)
(lambda (mails) (concat
(if (> (length mails) 0) " "
(concat (propertize
" " (concat
(propertize (if doom-modeline-icon
(concat (doom-modeline-icon-material "mail"
(if doom-modeline-icon :height 1.1
(doom-modeline-icon-material "mail" :v-adjust -0.225
:height 1.1 :face 'doom-modeline-warning)
:v-adjust -0.225 (propertize "#"
:face 'doom-modeline-warning) 'face '(:inherit (doom-modeline-warning doom-modeline-unread-number))))
(propertize "#" doom-modeline-vspc
'face '(:inherit (doom-modeline-warning doom-modeline-unread-number)))) (propertize (number-to-string mu4e-alert-mode-line)
doom-modeline-vspc 'face '(:inherit (doom-modeline-warning doom-modeline-unread-number))))
(propertize (length mails) 'mouse-face '(:box 0)
'face '(:inherit (doom-modeline-warning doom-modeline-unread-number)))) 'help-echo (if (= mu4e-alert-mode-line 1)
'mouse-face '(:box 0) "You have an unread email"
'help-echo (if (= mu4e-alert-mode-line 1) (format "You have %s unread emails" mu4e-alert-mode-line)))
"You have an unread email" " "))))
(format "You have %s unread emails" mu4e-alert-mode-line)))
" "))))))
(defun doom-modeline-override-mu4e-alert-modeline (&rest _) (defun doom-modeline-override-mu4e-alert-modeline (&rest _)
"Delete `mu4e-alert-mode-line' from global modeline string." "Delete `mu4e-alert-mode-line' from global modeline string."