Function: tab-bar-mouse-close-tab
tab-bar-mouse-close-tab is an interactive and byte-compiled function
defined in tab-bar.el.gz.
Signature
(tab-bar-mouse-close-tab EVENT)
Documentation
Close the tab you click on.
This is in contrast with tab-bar-mouse-1 that closes a tab
only when you click on its "x" close button.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/tab-bar.el.gz
(defun tab-bar-mouse-close-tab (event)
"Close the tab you click on.
This is in contrast with `tab-bar-mouse-1' that closes a tab
only when you click on its \"x\" close button."
(interactive "e")
(let* ((item (tab-bar--event-to-item (event-start event)))
(tab-number (tab-bar--key-to-number (nth 0 item))))
(unless (eq tab-number t)
(tab-bar-close-tab tab-number))))