Subject: bug#42052: 28.0.50; tab-bar-mode should be frame-local

From: James N. V. Cash <[email-masked]>
Date: Sat, 11 Jul 2020 10:45:35 -0400

Juri Linkov <[email-masked]> writes:

>> I've attached another patch that makes the key bindings & xpm icons get
>> loaded when tab-bar-show is 1 as well. It doesn't un-load the
>> keybindings in the way that globalling toggling tab-bar-mode off, but I
>> don't really see a sensible way of doing that frame-locally.
>
> ...
>
> If the variable `overriding-terminal-local-map` can't be made frame-local,
> then maybe a new rule could be added.  Then like `(get-char-property (point) 'keymap)`
> gets a keymap at point, a new rule could get a keymap from the frame alist.

I can look into that as a generally useful addition.

For this particular case though, I don't know if it's completely
necessary: The functions that are bound to keys here silently do nothing
if there's only one tab and the bindings don't get added if there are
other bindings for those keys, so as far as I can tell, it shouldn't
really make a difference whether or not the bindings are active when the
tab bar isn't visible.

It is entirely possible I'm missing something though and it certainly
does seem "cleaner" to remove the key bindings when they don't need to
be there.