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


View this message in rfc822 format

From: Bastian Beranek <bastian.beischer <at> gmail.com>
To: martin rudalics <rudalics <at> gmx.at>
Cc: 46299 <at> debbugs.gnu.org, Juri Linkov <juri <at> linkov.net>
Subject: bug#46299: 28.0.50; Value of tab-bar-show not respected in new frames.
Date: Tue, 9 Feb 2021 12:44:47 +0100
[Message part 1 (text/plain, inline)]
On Tue, Feb 9, 2021 at 10:45 AM martin rudalics <rudalics <at> gmx.at> wrote:
>
>  > +  "Determine the value of tab-bar-lines for FRAME.
>  > +The returned value will either be 1 or 0, meaning whether to show
>  > +the tab-bar or not. If tab-bar-mode is off, the returned value is
>  > +0. Otherwise the result depends on the value of the customizable
>  > +variable `tab-bar-show'."
>
> Please use active voice and always make sure to leave two spaces in
> front of a new sentence.  I would write it as
>
> (defun tab-bar--tab-bar-lines-for-frame (frame)
>    "Return new value of `tab-bar-lines' parameter for specified FRAME.
> Return 0 if `tab-bar-mode' is not enabled on FRAME or ....
> Return 1 if `tab-bar-mode' is enabled on FRAME and the variable
> `tab-bar-show' ...
>
> Call this function when ..."
>
> where the last sentence would describe when and why this function should
> be called, justifying the "new" in the doc-string.  Instead of "new" you
> can also use "adjusted" if the value gets just adjusted or your earlier
> "correct" provided an earlier calculation was "incorrect".

Thanks for your comments. I went with

(defun tab-bar--tab-bar-lines-for-frame (frame)
  "Determine and return the value of `tab-bar-lines' for FRAME.
Return 0 if `tab-bar-mode' is not enabled.  Otherwise return
either 1 or 0 depending on the value of the customizable variable
`tab-bar-show', which see."

Please see the attached v5 of the complete patch.

I don't think tab-bar-mode can vary from frame to frame? I also did
not add the "Call this function" part, because this is an internal
helper function that is only used from
"tab-bar--update-tab-bar-lines", just below. It just returns 0 or 1
and does not modify anything, the actual frame parameter modification
happens in the other function.

Hope this is satisfactory, if not please feel free to adjust as you wish.

Do I need to do the contribution paperworks for this patch? So far I
haven't done that.

Best
Bastian
[tab-bar_v5.patch (text/x-patch, attachment)]

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.