branch: externals/notmuch-indicator
commit 9daaa3cf532b6b5ab36f0600b2b7946977c5d021
Author: Protesilaos Stavrou <[email protected]>
Commit: Protesilaos Stavrou <[email protected]>
Make stylistic changes to notmuch-indicator--format-label
---
notmuch-indicator.el | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)
diff --git a/notmuch-indicator.el b/notmuch-indicator.el
index cf9c3e76c6..87ec969a35 100644
--- a/notmuch-indicator.el
+++ b/notmuch-indicator.el
@@ -251,17 +251,18 @@ COUNTER-FACE is that of `:counter-face'. Apply them to
LABEL and
COUNT, respectively. If nil, do not propertize LABEL or COUNT
with a face."
(let ((map (make-sparse-keymap)))
- (define-key map [mode-line mouse-1]
- (lambda () (interactive) (notmuch-search terms)))
+ (define-key map [mode-line mouse-1] (lambda () (interactive)
(notmuch-search terms)))
(concat " " ; to separate multiple counters without changing the mouse
hover highlight
(propertize
(format notmuch-indicator-counter-format
- (if (and label-face label)
- (propertize label 'face label-face)
- (or label ""))
- (if (and counter-face count)
- (propertize count 'face counter-face)
- (or count "")))
+ (cond
+ ((and label-face label) (propertize label 'face
label-face))
+ (label)
+ (""))
+ (cond
+ ((and counter-face count) (propertize count 'face
counter-face))
+ (count)
+ ("")))
'mouse-face 'mode-line-highlight
'help-echo (format "mouse-1: Open notmuch search for `%s'" terms)
'local-map map))))