[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/notmuch-indicator c2d7477ad7 1/2: Simplify counter rese
From: |
ELPA Syncer |
Subject: |
[elpa] externals/notmuch-indicator c2d7477ad7 1/2: Simplify counter reset |
Date: |
Wed, 19 Oct 2022 05:58:14 -0400 (EDT) |
branch: externals/notmuch-indicator
commit c2d7477ad7bdc973c01f42bf352d621b51556b31
Author: Protesilaos Stavrou <info@protesilaos.com>
Commit: Protesilaos Stavrou <info@protesilaos.com>
Simplify counter reset
Commit 65931b3 did not achieve its intended goal. Plus, it added
duplication to the code. This looks cleaner. Let's see it in action.
---
notmuch-indicator.el | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/notmuch-indicator.el b/notmuch-indicator.el
index 0e64831061..91adf96e61 100644
--- a/notmuch-indicator.el
+++ b/notmuch-indicator.el
@@ -211,8 +211,7 @@ It is appended to the `global-mode-string'.")
(defun notmuch-indicator--indicator ()
"Prepare new mail count mode line indicator."
- (when (not (string-empty-p notmuch-indicator-string))
- (setq global-mode-string (delq 'notmuch-indicator-string
global-mode-string)))
+ (setq global-mode-string (delq 'notmuch-indicator-string global-mode-string))
(if-let ((count (notmuch-indicator--return-count)))
(setq notmuch-indicator-string count
;; FIXME 2022-09-22: This may be hacky, but I cannot remember or
@@ -245,7 +244,6 @@ The delay is specified by
`notmuch-indicator-refresh-count'."
"Refresh the active indicator."
(when (notmuch-indicator--running-p)
(cancel-function-timers #'notmuch-indicator--indicator)
- (setq global-mode-string (delq 'notmuch-indicator-string
global-mode-string))
(notmuch-indicator--run)))
(define-obsolete-function-alias