From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id B18AA6DE0F80 for ; Thu, 28 Nov 2019 08:14:24 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: -0.273 X-Spam-Level: X-Spam-Status: No, score=-0.273 tagged_above=-999 required=5 tests=[AWL=-0.073, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1] autolearn=disabled Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 94b_7jqMtPR8 for ; Thu, 28 Nov 2019 08:14:24 -0800 (PST) Received: from jb55.com (jb55.com [45.79.91.128]) by arlo.cworth.org (Postfix) with ESMTPS id DA6506DE0F66 for ; Thu, 28 Nov 2019 08:14:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d= jb55.com; h=from:to:subject:date:message-id; s=default; bh=+ODgjHlbeW3CyFzIlr6HzhQaQV4DeRaADNU6IJYCjcc=; b=GB8Ni3bevnExQWMjfHZhtC5ptnavuq1FGczh8CJYGZx3U+X9ZxknrtiNzfMpa119NfTgD4si9jotST40CnU5e3LXG3e0Wx6ws72P+RIFqhoHZkapZRxj5D6G/xYU1MZjMmxTFxtGaE6r11+T6mc15/ITWq2GwsDv9wi0/H8VcEajkbjR2eYuW1wFIh73wCU6zdcaY4kDe+HbJhogRyPg/savv9Dkg1WVxKbTX8MoACwhQwCAKHZpivDMDiZb+o72L1brBGP0MePduAcJxBd2sMGdw454Six9CZ/utm+NOYK5/Vh7GWRpXzYuZyEbKyfKplGzw8BouOV+73Lr9sZQDA== Received: from jb55.com (S0106f0f249a68533.gv.shawcable.net [24.69.143.198]) by jb55.com (OpenSMTPD) with ESMTPSA id e9a19229 TLS version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO; Thu, 28 Nov 2019 16:14:19 +0000 (UTC) From: William Casarin To: notmuch@notmuchmail.org Subject: [PATCH v2 4/8] emacs/tree: add kill-both prefix argument to notmuch-tree-quit Date: Thu, 28 Nov 2019 08:13:57 -0800 Message-Id: <20191128161401.28844-5-jb55@jb55.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191128161401.28844-1-jb55@jb55.com> References: <20191128161401.28844-1-jb55@jb55.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Nov 2019 16:14:24 -0000 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 b9173790..367b10c4 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.23.0