aboutsummaryrefslogtreecommitdiffhomepage
path: root/emacs/notmuch.el
diff options
context:
space:
mode:
authorGravatar David Bremner <david@tethera.net>2014-05-28 09:50:32 -0300
committerGravatar David Bremner <david@tethera.net>2014-05-28 09:50:32 -0300
commit94064a6ba2f67005352915dc01c6eb0e19b761f9 (patch)
tree61f9fc6c78daafa39a93cdcd9336d246b240bd48 /emacs/notmuch.el
parentec020894331b0ef9b594cdc47f4b79abeda4f9cd (diff)
parent90f9a5e65e8dab3fad0a60530d3ffc582f1b1a93 (diff)
Merge branch 'release'
A point release is slowly being built on branch release. Merge those changes into master.
Diffstat (limited to 'emacs/notmuch.el')
-rw-r--r--emacs/notmuch.el6
1 files changed, 4 insertions, 2 deletions
diff --git a/emacs/notmuch.el b/emacs/notmuch.el
index 8aa01049..f6bf9c84 100644
--- a/emacs/notmuch.el
+++ b/emacs/notmuch.el
@@ -428,14 +428,16 @@ matched and unmatched messages in the current thread."
"Return the stable query for the current region.
If ONLY-MATCHED is non-nil, include only matched messages. If it
-is nil, include both matched and unmatched messages."
+is nil, include both matched and unmatched messages. If there are
+no messages in the region then return nil."
(let ((query-list nil) (all (not only-matched)))
(dolist (queries (notmuch-search-properties-in-region :query beg end))
(when (first queries)
(push (first queries) query-list))
(when (and all (second queries))
(push (second queries) query-list)))
- (concat "(" (mapconcat 'identity query-list ") or (") ")")))
+ (when query-list
+ (concat "(" (mapconcat 'identity query-list ") or (") ")"))))
(defun notmuch-search-find-authors ()
"Return the authors for the current thread"