GNU bug report logs -
#46299
28.0.50; Value of tab-bar-show not respected in new frames.
Previous Next
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
> I noticed that with the latest master branch setting tab-bar-show
> to "1" does not work work for new frames. On those the tabs are shown
> even if tab-bar-show is set to 1.
Thanks for finding a case that is still unhandled.
> I suppose a hook is needed which applies the correct setting
> to the new frame?
Generally, Emacs core packages should avoid adding own code
to hooks, because hooks are intended mostly for users, such as
for example, configuring to enable tab-bar selectively:
(add-hook 'after-make-frame-functions 'toggle-frame-tab-bar)
Fortunately, frames provide a better way to set their default values
with default-frame-alist, that tab-bar-mode already modifies.
So doing something similar fixes the problem:
[tab-bar-show-default-frame-alist.patch (text/x-diff, inline)]
diff --git a/lisp/tab-bar.el b/lisp/tab-bar.el
index 6720d82b47..0cf74a7833 100644
--- a/lisp/tab-bar.el
+++ b/lisp/tab-bar.el
@@ -252,6 +252,12 @@ tab-bar-show
(set-default sym val)
;; Preload button images
(tab-bar-mode 1)
+ ;; New frames have only one tab, so hide it by default
+ (when (eq val 1)
+ (setq default-frame-alist
+ (cons (cons 'tab-bar-lines 0)
+ (assq-delete-all 'tab-bar-lines
+ default-frame-alist))))
;; Then handle each frame individually
(dolist (frame (frame-list))
(set-frame-parameter
This bug report was last modified 4 years and 88 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.