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

From: Juri Linkov <[email-masked]>
Date: Fri, 10 Jul 2020 02:49:42 +0300

> 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.

I don't know if such thing as frame-local keybindings is currently possible.

The manual at (info "(elisp) Searching Keymaps") shows the decision tree:

     (or (if overriding-terminal-local-map
             (FIND-IN overriding-terminal-local-map))
         (if overriding-local-map
             (FIND-IN overriding-local-map)
           (or (FIND-IN (get-char-property (point) 'keymap))
               (FIND-IN-ANY emulation-mode-map-alists)
               (FIND-IN-ANY minor-mode-overriding-map-alist)
               (FIND-IN-ANY minor-mode-map-alist)
               (if (get-text-property (point) 'local-map)
                   (FIND-IN (get-char-property (point) 'local-map))
                 (FIND-IN (current-local-map)))))
         (FIND-IN (current-global-map)))

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.