Subject: bug#75918: [PATCH] Add new user option tab-bar-define-keys

From: Juri Linkov <[email-masked]>
Date: Wed, 29 Jan 2025 20:58:09 +0200

> +  (when (memq tab-bar-define-keys '(t tab))
> +    (define-key tab-bar-mode-map [(control tab)] #'tab-next)
> +    (define-key tab-bar-mode-map [(control shift tab)] #'tab-previous)
> +    (define-key tab-bar-mode-map [(control shift iso-lefttab)] #'tab-previous))

But we still need to check with global-key-binding here
before binding TAB keys.  This will ensure backwards-compatibility.

> -(defun tab-bar-mode--tab-key-bind (map key binding)
> -  ;; Don't override user customized global key bindings
> -  (define-key map key
> -    `(menu-item "" ,binding
> -      :filter ,(lambda (cmd) (unless (global-key-binding key) cmd)))))