[PATCH v4 4/7] emacs/tree: add kill-both prefix argument to notmuch-tree-quit

Subject: [PATCH v4 4/7] emacs/tree: add kill-both prefix argument to notmuch-tree-quit

Date: Sat, 4 Apr 2020 13:41:39 -0700

To: notmuch@notmuchmail.org

Cc:

From: William Casarin


This allows us to close both windows at the same time.

Signed-off-by: William Casarin <jb55@jb55.com>
---
 emacs/notmuch-tree.el | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/emacs/notmuch-tree.el b/emacs/notmuch-tree.el
index e6a6e67f..b405e9e3 100644
--- a/emacs/notmuch-tree.el
+++ b/emacs/notmuch-tree.el
@@ -584,10 +584,10 @@ Shows in split pane or whole window according to value of
   (when (notmuch-tree-scroll-message-window)
     (notmuch-tree-next-matching-message)))
 
-(defun notmuch-tree-quit ()
+(defun notmuch-tree-quit (&optional kill-both)
   "Close the split view or exit tree."
-  (interactive)
-  (unless (notmuch-tree-close-message-window)
+  (interactive "P")
+  (when (or (not (notmuch-tree-close-message-window)) kill-both)
     (kill-buffer (current-buffer))))
 
 (defun notmuch-tree-close-message-window ()
-- 
2.25.1

_______________________________________________
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch

Thread: