Function: toggle-frame-tab-bar

toggle-frame-tab-bar is an interactive and byte-compiled function defined in tab-bar.el.gz.

Signature

(toggle-frame-tab-bar &optional FRAME)

Documentation

Toggle tab bar of the selected frame.

When calling from Lisp, use the optional argument FRAME to toggle the tab bar on that frame. This is useful if you want to enable the tab bar individually on each new frame when the global tab-bar-mode(var)/tab-bar-mode(fun) is disabled, or if you want to disable the tab bar individually on each new frame when the global tab-bar-mode(var)/tab-bar-mode(fun) is enabled, by using

  (add-hook 'after-make-frame-functions 'toggle-frame-tab-bar)

Probably introduced at or before Emacs version 28.1.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/tab-bar.el.gz
(defun toggle-frame-tab-bar (&optional frame)
  "Toggle tab bar of the selected frame.
When calling from Lisp, use the optional argument FRAME to toggle
the tab bar on that frame.
This is useful if you want to enable the tab bar individually
on each new frame when the global `tab-bar-mode' is disabled,
or if you want to disable the tab bar individually on each
new frame when the global `tab-bar-mode' is enabled, by using

  (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))
  (set-frame-parameter frame 'tab-bar-lines-keep-state
                       (not (frame-parameter frame 'tab-bar-lines-keep-state))))