GNU bug report logs - #46299
28.0.50; Value of tab-bar-show not respected in new frames.

Previous Next

Package: emacs;

Reported by: Bastian Beischer <bastian.beischer <at> gmail.com>

Date: Thu, 4 Feb 2021 16:16:02 UTC

Severity: normal

Tags: fixed

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 #92 received at 46299 <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> linkov.net>
To: Bastian Beranek <bastian.beischer <at> gmail.com>
Cc: martin rudalics <rudalics <at> gmx.at>, 46299 <at> debbugs.gnu.org
Subject: Re: bug#46299: 28.0.50; Value of tab-bar-show not respected in new
 frames.
Date: Sat, 13 Feb 2021 20:23:20 +0200
Hey Bastian,

Thank you for working on this patch.  Please prepare the ChangeLog
commit message, so your patch could be pushed to master.  Then it would be
easier to reason about further changes and base them on the pushed version.

> @@ -89,8 +89,9 @@ tab-bar-select-tab-modifiers
>   :set (lambda (sym val)
>          (set-default sym val)
>          ;; Reenable the tab-bar with new keybindings
> -         (tab-bar-mode -1)
> -         (tab-bar-mode 1))
> +         (when tab-bar-mode
> +           (tab-bar-mode -1)
> +           (tab-bar-mode 1)))
>   :group 'tab-bar
>   :version "27.1")
>
> This seems to fix the issue. I can't say I fully understand why
> though. It must have something to do with running
> tab-bar--update-tab-bar-lines in early initialization? We could also
> wrap the call to tab-bar--update-tab-bar-lines.

The problem is that currently the function tab-bar-mode contains:

  (if tab-bar-mode
      (tab-bar--define-keys)
    ;; Unset only keys bound by tab-bar
    (when (eq (global-key-binding [(control tab)]) 'tab-next)
      (global-unset-key [(control tab)]))
    ...

If the global-unset-key part would be refactored into a separate
function, then tab-bar-select-tab-modifiers could call two
functions sequentially: a new function that undefines old keys,
then the existing separate function tab-bar--define-keys
that will define keys with customized modifier.




This bug report was last modified 4 years and 138 days ago.

Previous Next


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