Variable: tab-bar-format

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

Value

(tab-bar-format-history tab-bar-format-tabs tab-bar-separator tab-bar-format-add-tab)

Documentation

Template for displaying tab bar items.

Every item in the list is a function that returns a string, or a list of menu-item elements, or nil. Adding a function to the list causes the tab bar to show that string, or display a tab button which, when clicked, will invoke the command that is the binding of the menu item. The menu-item binding of nil will produce a tab clicking on which will select that tab. The menu-item's title is displayed as the label of the tab. If a function returns nil, it doesn't directly affect the tab bar appearance, but can do that by some side-effect. If the list ends with tab-bar-format-align-right and tab-bar-format-global, then after enabling display-time-mode(var)/display-time-mode(fun)
(or any other mode that uses global-mode-string),
it will display time aligned to the right on the tab bar instead of the mode line. Replacing tab-bar-format-tabs with tab-bar-format-tabs-groups will group tabs on the tab bar.

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

Probably introduced at or before Emacs version 28.1.

Source Code

;; Defined in /usr/src/emacs/lisp/tab-bar.el.gz
(defcustom tab-bar-format '(tab-bar-format-history
                            tab-bar-format-tabs
                            tab-bar-separator
                            tab-bar-format-add-tab)
  "Template for displaying tab bar items.
Every item in the list is a function that returns
a string, or a list of menu-item elements, or nil.
Adding a function to the list causes the tab bar to show
that string, or display a tab button which, when clicked,
will invoke the command that is the binding of the menu item.
The menu-item binding of nil will produce a tab clicking
on which will select that tab.  The menu-item's title is
displayed as the label of the tab.
If a function returns nil, it doesn't directly affect the
tab bar appearance, but can do that by some side-effect.
If the list ends with `tab-bar-format-align-right' and
`tab-bar-format-global', then after enabling `display-time-mode'
(or any other mode that uses `global-mode-string'),
it will display time aligned to the right on the tab bar instead
of the mode line.  Replacing `tab-bar-format-tabs' with
`tab-bar-format-tabs-groups' will group tabs on the tab bar."
  :type 'hook
  :options '(tab-bar-format-menu-bar
             tab-bar-format-history
             tab-bar-format-tabs
             tab-bar-format-tabs-groups
             tab-bar-separator
             tab-bar-format-add-tab
             tab-bar-format-align-right
             tab-bar-format-global)
  :initialize 'custom-initialize-default
  :set (lambda (sym val)
         (set-default sym val)
         (force-mode-line-update))
  :group 'tab-bar
  :version "28.1")