aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam Casarin <jb55@jb55.com>2020-04-04 13:41:31 -0700
committerDavid Bremner <david@tethera.net>2020-04-06 07:14:32 -0300
commit8eec15a90338afe0f1933466a90e53767a0a4ccb (patch)
treea86cc740347aac3df5e8ec12182685b5a7b43582
parent144cf30e2c71d57795b5fbdec10af0ef73aa01ff (diff)
emacs/tree: return true if a thread was found in next-thread
This will allow us to pop back to parent buffers when there are no more threads to jump to. Signed-off-by: William Casarin <jb55@jb55.com>
-rw-r--r--emacs/notmuch-tree.el5
1 files changed, 4 insertions, 1 deletions
diff --git a/emacs/notmuch-tree.el b/emacs/notmuch-tree.el
index 9a83292c..1bcf6cf9 100644
--- a/emacs/notmuch-tree.el
+++ b/emacs/notmuch-tree.el
@@ -679,10 +679,13 @@ message will be \"unarchived\", i.e. the tag changes in
(notmuch-tree-thread-top))
(defun notmuch-tree-next-thread ()
+ "Get the next thread in the current tree. Returns t if a thread was
+found or nil if not."
(interactive)
(forward-line 1)
(while (not (or (notmuch-tree-get-prop :first) (eobp)))
- (forward-line 1)))
+ (forward-line 1))
+ (not (eobp)))
(defun notmuch-tree-thread-mapcar (function)
"Iterate through all messages in the current thread