Rebind 'tab-bar-mouse-close-tab' from <down-mouse-2> to <mouse-2>

* lisp/tab-bar.el (tab-bar-map): Unbind <mouse-2> from 'ignore'.
Bind 'tab-bar-mouse-close-tab' to <mouse-2> instead of <down-mouse-2>
(bug#80858).
This commit is contained in:
Juri Linkov 2026-04-21 19:30:03 +03:00
parent c6ec2c6ce1
commit 330ccd3368
2 changed files with 5 additions and 2 deletions

View file

@ -603,6 +603,10 @@ This hook allows you to operate on a reopened tab.
This is useful when you define custom tab parameters that may need
adjustment when a tab is restored, and avoids advice.
---
*** Tabs are closed now on releasing the middle mouse button.
Previously, closing the tab-bar's tabs was on pressing the button.
---
*** New user option 'tab-bar-define-keys'.
This controls which key bindings tab-bar creates. Values are t, the

View file

@ -565,8 +565,7 @@ appropriate."
"<down-mouse-1>" #'tab-bar-mouse-down-1
"<drag-mouse-1>" #'tab-bar-mouse-move-tab
"<mouse-1>" #'tab-bar-mouse-1
"<down-mouse-2>" #'tab-bar-mouse-close-tab
"<mouse-2>" #'ignore
"<mouse-2>" #'tab-bar-mouse-close-tab
"<down-mouse-3>" #'tab-bar-mouse-context-menu
"<mouse-4>" #'tab-previous