From 781190964ac7ad76174f2703e9c637cee3858795 Mon Sep 17 00:00:00 2001 From: Benson Chu Date: Tue, 27 Jan 2026 14:50:13 -0600 Subject: [PATCH] Return whether the tab was really closed --- lisp/switch-tabs.el | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lisp/switch-tabs.el b/lisp/switch-tabs.el index 3ac5f82..754c3ad 100644 --- a/lisp/switch-tabs.el +++ b/lisp/switch-tabs.el @@ -74,9 +74,10 @@ (defun close-tab-switch () (interactive) (let ((old-name (alist-get 'name (tab-bar--current-tab)))) - (when (y-or-n-p (format "Close tab \"%s\"? " - old-name)) - (tab-bar-close-tab)))) + (aprog1 (y-or-n-p (format "Close tab \"%s\"? " + old-name)) + (when it + (tab-bar-close-tab))))) (defun tab-bar-report () (interactive)