aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobert Cochran2019-12-11 10:29:00 -0800
committerJuri Linkov2019-12-16 00:55:54 +0200
commit35388c56795822d7811878dcf1e105a369ffb044 (patch)
tree2113b59d4eb97191c10ababa9e53ba6760edc6ae
parentc46a4931b1a127f0b1a040a4a48174d4dbca8d16 (diff)
downloademacs-35388c56795822d7811878dcf1e105a369ffb044.tar.gz
emacs-35388c56795822d7811878dcf1e105a369ffb044.zip
* lisp/tab-bar.el (tab-bar-close-other-tabs): Use tab close customs
-rw-r--r--lisp/tab-bar.el11
1 files changed, 9 insertions, 2 deletions
diff --git a/lisp/tab-bar.el b/lisp/tab-bar.el
index 7e8f56de2a7..e045a778656 100644
--- a/lisp/tab-bar.el
+++ b/lisp/tab-bar.el
@@ -906,11 +906,18 @@ for the last tab on a frame is determined by
906 (current-index (tab-bar--current-tab-index tabs))) 906 (current-index (tab-bar--current-tab-index tabs)))
907 (when current-index 907 (when current-index
908 (dotimes (index (length tabs)) 908 (dotimes (index (length tabs))
909 (unless (eq index current-index) 909 (unless (or (eq index current-index)
910 (run-hook-with-args-until-success
911 'tab-bar-tab-prevent-close-functions
912 (nth index tabs)
913 ; last-tab-p logically can't ever be true if we
914 ; make it this far
915 nil))
910 (push `((frame . ,(selected-frame)) 916 (push `((frame . ,(selected-frame))
911 (index . ,index) 917 (index . ,index)
912 (tab . ,(nth index tabs))) 918 (tab . ,(nth index tabs)))
913 tab-bar-closed-tabs))) 919 tab-bar-closed-tabs)
920 (run-hook-with-args 'tab-bar-tab-pre-close-functions (nth index tabs) nil)))
914 (set-frame-parameter nil 'tabs (list (nth current-index tabs))) 921 (set-frame-parameter nil 'tabs (list (nth current-index tabs)))
915 922
916 (when (and tab-bar-mode 923 (when (and tab-bar-mode