diff options
-rw-r--r-- | net/jao-maildir.el | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/net/jao-maildir.el b/net/jao-maildir.el index 12c534a..421f8b3 100644 --- a/net/jao-maildir.el +++ b/net/jao-maildir.el @@ -46,6 +46,18 @@ (defvar jao-maildir-tracked-maildirs) (defvar jao-maildir-mode-line-string "") +(defvar jao-maildir-additional-info ()) + +(defun jao-maildir-refresh-echo () + (with-current-buffer " *Minibuf-0*" + (erase-buffer) + (let ((mailp (not (string-blank-p jao-maildir-mode-line-string)))) + (when (or mailp infop) + (insert (format "%s%s%s" + (if mailp "Mail" "") + (if mailp jao-maildir-mode-line-string "") + (or (format-mode-line jao-maildir-additional-info) + ""))))))) (defun jao-maildir--update-mode-line-string () (let ((total 0) @@ -62,11 +74,7 @@ 'face 'font-lock-function-name-face)) (s (if (string-empty-p s) s (concat s " ")))) (setq jao-maildir-mode-line-string (format "%s%s" total s)) - (when jao-maildir-echo-p - (with-current-buffer " *Minibuf-0*" - (erase-buffer) - (when (not (string-blank-p jao-maildir-mode-line-string)) - (insert (format "Mail %s" jao-maildir-mode-line-string))))) + (when jao-maildir-echo-p (jao-maildir-refresh-echo)) (force-mode-line-update t)))) (defvar jao-maildir--watches nil) |