Variable: tab-bar-show

tab-bar-show is a customizable variable defined in tab-bar.el.gz.

Value

t

Documentation

Defines when to show the tab bar.

If t, the default, enable tab-bar-mode(var)/tab-bar-mode(fun) automatically upon using the commands that create new window configurations (e.g., tab-new). If a non-negative integer, show the tab bar only if the number of the tabs exceeds the value of this variable. In particular, if the value is 1, hide the tab bar when it has only one tab, and show it again once more tabs are created. A value that is a non-negative integer also makes the tab bar appearance be different on different frames: the tab bar can be shown on some frames and hidden on others, depending on how many tab-bar tabs are on that frame, and whether that number is greater than the numerical value of this variable. If nil, always keep the tab bar hidden. In this case it's still possible to use persistent named window configurations by relying on keyboard commands tab-new, tab-close, tab-next, tab-switcher, etc.

Setting this variable directly does not take effect; please customize it (see the info node (emacs)Easy Customization), then it will automatically update the tab bar on all frames according to the new value.

To enable or disable the tab bar individually on each frame, you can use the command toggle-frame-tab-bar.

This variable was added, or its default value changed, in Emacs 27.1.

View in manual

Probably introduced at or before Emacs version 27.1.

Source Code

;; Defined in /usr/src/emacs/lisp/tab-bar.el.gz
(defcustom tab-bar-show t
  "Defines when to show the tab bar.
If t, the default, enable `tab-bar-mode' automatically upon using
the commands that create new window configurations (e.g., `tab-new').
If a non-negative integer, show the tab bar only if the number of
the tabs exceeds the value of this variable.  In particular,
if the value is 1, hide the tab bar when it has only one tab, and
show it again once more tabs are created.  A value that is a
non-negative integer also makes the tab bar appearance be different
on different frames: the tab bar can be shown on some frames and
hidden on others, depending on how many tab-bar tabs are on that
frame, and whether that number is greater than the numerical value
of this variable.
If nil, always keep the tab bar hidden.  In this case it's still
possible to use persistent named window configurations by relying on
keyboard commands `tab-new', `tab-close', `tab-next', `tab-switcher', etc.

Setting this variable directly does not take effect; please customize
it (see the info node `Easy Customization'), then it will automatically
update the tab bar on all frames according to the new value.

To enable or disable the tab bar individually on each frame,
you can use the command `toggle-frame-tab-bar'."
  :type '(choice (const :tag "Always" t)
                 (const :tag "When more than one tab" 1)
                 (const :tag "Never" nil))
  :initialize 'custom-initialize-default
  :set (lambda (sym val)
         (set-default sym val)
         (if val
             (tab-bar-mode 1)
           (tab-bar--update-tab-bar-lines t)))
  :group 'tab-bar
  :version "27.1")