Function: window-tool-bar-mode

window-tool-bar-mode is an autoloaded, interactive and byte-compiled function defined in window-tool-bar.el.gz.

Signature

(window-tool-bar-mode &optional ARG)

Documentation

Toggle display of the tool bar in the tab line of the current buffer.

This is a minor mode. If called interactively, toggle the Window-Tool-Bar mode mode. If the prefix argument is positive, enable the mode, and if it is zero or negative, disable the mode.

If called from Lisp, toggle the mode if ARG is toggle. Enable the mode if ARG is nil, omitted, or is a positive number. Disable the mode if ARG is a negative number.

To check whether the minor mode is enabled in the current buffer, evaluate the variable window-tool-bar-mode(var)/window-tool-bar-mode(fun).

The mode's hook is called both when the mode is enabled and when it is disabled.

View in manual

Probably introduced at or before Emacs version 30.1.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/window-tool-bar.el.gz
;;;###autoload
(define-minor-mode window-tool-bar-mode
  "Toggle display of the tool bar in the tab line of the current buffer."
  :global nil
  (let ((should-display (and window-tool-bar-mode
                             tool-bar-map))
        (default-value '(:eval (window-tool-bar-string))))

    ;; Preserve existing tab-line set outside of this mode
    (if (or (null tab-line-format)
	    (equal tab-line-format default-value))
        (if should-display
            (setq tab-line-format default-value)
          (setq tab-line-format nil))
      (message
       "tab-line-format set outside of window-tool-bar-mode, currently `%S'"
       tab-line-format))))