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

2019-12-30 Thread David Edmondson
On Saturday, 2019-12-28 at 10:01:21 -05, William Casarin wrote:

> This allows us to close both windows at the same time.
>
> Signed-off-by: William Casarin 

Reviewed-by: David Edmondson 

> ---
>  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 25d84f45..f66219c5 100644
> --- a/emacs/notmuch-tree.el
> +++ b/emacs/notmuch-tree.el
> @@ -530,10 +530,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.24.0
>
> ___
> notmuch mailing list
> notmuch@notmuchmail.org
> https://notmuchmail.org/mailman/listinfo/notmuch

dme.
-- 
Oh there ain't no way to say I love you more.
___
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch


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

2019-12-28 Thread William Casarin
This allows us to close both windows at the same time.

Signed-off-by: William Casarin 
---
 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 25d84f45..f66219c5 100644
--- a/emacs/notmuch-tree.el
+++ b/emacs/notmuch-tree.el
@@ -530,10 +530,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.24.0

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