GNU bug report logs - #75918
[PATCH] Add new user option tab-bar-define-keys

Previous Next

Package: emacs;

Reported by: Ship Mints <shipmints <at> gmail.com>

Date: Tue, 28 Jan 2025 23:00:02 UTC

Severity: normal

Tags: patch

Fixed in version 31.0.50

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

Bug is archived. No further changes may be made.

Full log


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

From: Ship Mints <shipmints <at> gmail.com>
To: Juri Linkov <juri <at> linkov.net>
Cc: 75918 <at> debbugs.gnu.org
Subject: Re: bug#75918: [PATCH] Add new user option tab-bar-define-keys
Date: Wed, 29 Jan 2025 12:52:18 -0500
[Message part 1 (text/plain, inline)]
Right. How about I get rid of tab-bar-mode--tab-key-bind and just bind
normally? I'll submit a revised patch shortly, if so.

On Wed, Jan 29, 2025 at 12:35 PM Juri Linkov <juri <at> linkov.net> wrote:

> >>> This is useful to avoid key binding conflicts, such as when folding in
> >>> outline mode using TAB keys, or when a user wants to define her own
> >>> tab-bar keys without first having to remove the defaults.
> >>
> >> The current implementation was intended to allow removing the default
> keys
> >> easily from 'tab-bar-mode-map'.  Here is the NEWS from bug#69578:
> >>
> >>  *** New keymap 'tab-bar-mode-map'.
> >>  By default it contains a keybinding 'C-TAB' to switch tabs, but only
> >>  when 'C-TAB' is not bound globally.  You can unbind it if it conflicts
> >>  with 'C-TAB' in other modes.
> >
> > This strategy doesn't account for the key definition race condition, and
> > relies on the user to have first defined global TAB keys before
> > tab-bar-mode is enabled.
>
> It checks for global-key-binding every time when the user types C-TAB.
> So it could also check with local-key-binding and
> minor-mode-key-binding in e.g. outline mode, etc.
>
> But since you want to move the C-TAB keybinding from tab-bar-mode-map
> back to tab-bar--define-keys, then :filter is not needed anymore,
> so you can check for global-key-binding only once in tab-bar--define-keys.
>
[Message part 2 (text/html, inline)]

This bug report was last modified 113 days ago.

Previous Next


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