GNU bug report logs - #41343
tab-bar-mode: Close tab on mouse-2 click

Previous Next

Package: emacs;

Reported by: Stefan Kangas <stefankangas <at> gmail.com>

Date: Sun, 17 May 2020 04:06:02 UTC

Severity: wishlist

Tags: fixed, patch

Merged with 41342

Fixed in version 28.0.50

Done: Juri Linkov <juri <at> linkov.net>

Bug is archived. No further changes may be made.

Full log


Message #32 received at 41343 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Juri Linkov <juri <at> linkov.net>
Cc: 41343 <at> debbugs.gnu.org, stefankangas <at> gmail.com
Subject: Re: bug#41343: tab-bar-mode: Close tab on mouse-2 click
Date: Thu, 05 Aug 2021 08:43:46 +0300
> From: Juri Linkov <juri <at> linkov.net>
> Cc: stefankangas <at> gmail.com,  41343 <at> debbugs.gnu.org
> Date: Wed, 04 Aug 2021 23:13:12 +0300
> 
> > Do we really have to hard-code the mouse button this way, including
> > explicit values in C?  Why is that necessary or justified?
> 
> In tab-line.el it was very easy to bind mouse-2 to close the tab:
> 
>   (defvar tab-line-tab-map
>     (let ((map (make-sparse-keymap)))
>       (define-key map [tab-line mouse-1] 'tab-line-select-tab)
>       (define-key map [tab-line mouse-2] 'tab-line-close-tab)
> 
> But it's impossible to do the same for the menu-bar and the tool-bar
> and so in the tab-bar too.

Why not?  What prevents that?

> Ot do you mean adding an integer variable that holds
> a number of the mouse button used to close the tab?
> For example, tab-bar-close-tab-mouse-button = 2.

I think we should explore such possibilities only after we understand
why normal key bindings don't work.




This bug report was last modified 3 years and 252 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.