]> git.notmuchmail.org Git - notmuch/commitdiff
emacs/tree: add kill-both prefix argument to notmuch-tree-quit
authorWilliam Casarin <jb55@jb55.com>
Sat, 4 Apr 2020 20:41:34 +0000 (13:41 -0700)
committerDavid Bremner <david@tethera.net>
Mon, 6 Apr 2020 10:15:27 +0000 (07:15 -0300)
This allows us to close both windows at the same time.

Signed-off-by: William Casarin <jb55@jb55.com>
emacs/notmuch-tree.el

index e6a6e67fd8048aae34807c11bd7e4c8c5970d554..b405e9e3be99cbdce879f2e4ce7b0a4946dbdad2 100644 (file)
@@ -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)))
 
   (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."
   "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 ()
     (kill-buffer (current-buffer))))
 
 (defun notmuch-tree-close-message-window ()