[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#46299: 28.0.50; Value of tab-bar-show not respected in new frames.
From: |
Bastian Beranek |
Subject: |
bug#46299: 28.0.50; Value of tab-bar-show not respected in new frames. |
Date: |
Tue, 16 Feb 2021 16:31:59 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
Bastian Beranek <bastian.beischer@gmail.com> writes:
> Is this acceptable?
>
> Proposed patch is attached.
>
I made a mistake in that patch: In (frame-parameter ... ) the first
argument should have been "frame" not "nil". Please find a fixed
version attached.
>From d4d40915ad6537fdd11555dfed2273303c564fb9 Mon Sep 17 00:00:00 2001
From: Bastian Beranek <bastian.beischer@rwth-aachen.de>
Date: Tue, 16 Feb 2021 11:35:35 +0100
Subject: [PATCH] * lisp/tab-bar.el: Fix behavior of toggle-frame-tab-bar (bug
#46299)
(toggle-frame-tab-bar): Add frame parameter to protect tab bar state.
(tab-bar--update-tab-bar-lines): Check parameter.
---
lisp/tab-bar.el | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/lisp/tab-bar.el b/lisp/tab-bar.el
index 4e47ae2c10..f0210e1a42 100644
--- a/lisp/tab-bar.el
+++ b/lisp/tab-bar.el
@@ -161,7 +161,8 @@ tab-bar--update-tab-bar-lines
(t frames))))
;; Loop over all frames and update default-frame-alist
(dolist (frame frame-lst)
- (set-frame-parameter frame 'tab-bar-lines
(tab-bar--tab-bar-lines-for-frame frame))))
+ (unless (frame-parameter frame 'tab-bar-lines-keep-state)
+ (set-frame-parameter frame 'tab-bar-lines
(tab-bar--tab-bar-lines-for-frame frame)))))
(when (eq frames t)
(setq default-frame-alist
(cons (cons 'tab-bar-lines (if (and tab-bar-mode (eq tab-bar-show
t)) 1 0))
@@ -233,7 +234,9 @@ toggle-frame-tab-bar
(add-hook 'after-make-frame-functions 'toggle-frame-tab-bar)"
(interactive)
(set-frame-parameter frame 'tab-bar-lines
- (if (> (frame-parameter frame 'tab-bar-lines) 0) 0 1)))
+ (if (> (frame-parameter frame 'tab-bar-lines) 0) 0 1))
+ (set-frame-parameter frame 'tab-bar-lines-keep-state
+ (not (frame-parameter frame
'tab-bar-lines-keep-state))))
(defvar tab-bar-map (make-sparse-keymap)
"Keymap for the tab bar.
--
2.30.1
- bug#46299: 28.0.50; Value of tab-bar-show not respected in new frames., (continued)
- bug#46299: 28.0.50; Value of tab-bar-show not respected in new frames., Bastian Beranek, 2021/02/15
- bug#46299: 28.0.50; Value of tab-bar-show not respected in new frames., Bastian Beranek, 2021/02/15
- bug#46299: 28.0.50; Value of tab-bar-show not respected in new frames., Juri Linkov, 2021/02/15
- bug#46299: 28.0.50; Value of tab-bar-show not respected in new frames., Bastian Beranek, 2021/02/15
- bug#46299: [External] : bug#46299: 28.0.50; Value of tab-bar-show not respected in new frames., Drew Adams, 2021/02/15
- bug#46299: 28.0.50; Value of tab-bar-show not respected in new frames., Bastian Beranek, 2021/02/16
- bug#46299: 28.0.50; Value of tab-bar-show not respected in new frames.,
Bastian Beranek <=
- bug#46299: 28.0.50; Value of tab-bar-show not respected in new frames., Juri Linkov, 2021/02/16
- bug#46299: 28.0.50; Value of tab-bar-show not respected in new frames., Juri Linkov, 2021/02/24
- bug#46299: 28.0.50; Value of tab-bar-show not respected in new frames., Juri Linkov, 2021/02/10