aboutsummaryrefslogtreecommitdiffhomepage
path: root/emacs
diff options
context:
space:
mode:
authorGravatar Michal Sojka <sojkam1@fel.cvut.cz>2012-02-18 23:12:29 +0100
committerGravatar David Bremner <bremner@debian.org>2012-03-10 10:10:27 -0400
commit4a0740920d2a92d6a7d71ec7b8fc50e441e7552d (patch)
treed899b512797874f232c282c88f6da63d067d7788 /emacs
parent4b3af0e4443f88f302f09a7a6099a31103d862d6 (diff)
emacs-hello: Do not calculate the count of the messages in hidden sections
The result is that hello screen shows much faster when some sections are hidden.
Diffstat (limited to 'emacs')
-rw-r--r--emacs/notmuch-hello.el20
1 files changed, 10 insertions, 10 deletions
diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el
index aad373d6..e9caade5 100644
--- a/emacs/notmuch-hello.el
+++ b/emacs/notmuch-hello.el
@@ -695,16 +695,16 @@ Supports the following entries in OPTIONS as a plist:
(notmuch-hello-update))
"hide"))
(widget-insert "\n")
- (let (target-pos
- (searches (apply 'notmuch-hello-query-counts query-alist options)))
- (when (and (not is-hidden)
- (or (not (plist-get options :hide-if-empty))
- searches))
- (widget-insert "\n")
- (setq target-pos
- (notmuch-hello-insert-buttons searches))
- (indent-rigidly start (point) notmuch-hello-indent)
- target-pos))))
+ (let (target-pos)
+ (when (not is-hidden)
+ (let ((searches (apply 'notmuch-hello-query-counts query-alist options)))
+ (when (or (not (plist-get options :hide-if-empty))
+ searches)
+ (widget-insert "\n")
+ (setq target-pos
+ (notmuch-hello-insert-buttons searches))
+ (indent-rigidly start (point) notmuch-hello-indent))))
+ target-pos)))
(defun notmuch-hello-insert-tags-section (&optional title &rest options)
"Insert a section displaying all tags with message counts.