Function: mode-line-invisible-mode
mode-line-invisible-mode is an interactive and byte-compiled function
defined in simple.el.gz.
Signature
(mode-line-invisible-mode &optional ARG)
Documentation
Toggle the mode-line visibility of the current buffer.
Hide the mode line if it is shown, and show it if it's hidden.
This is a minor mode. If called interactively, toggle the
Mode-Line-Invisible 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 mode-line-invisible-mode(var)/mode-line-invisible-mode(fun).
The mode's hook is called both when the mode is enabled and when it is disabled.
Probably introduced at or before Emacs version 31.1.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/simple.el.gz
(define-minor-mode mode-line-invisible-mode
"Toggle the mode-line visibility of the current buffer.
Hide the mode line if it is shown, and show it if it's hidden."
:global nil
:group 'mode-line
(if mode-line-invisible-mode
(progn
(add-hook 'after-change-major-mode-hook #'mode-line-invisible-mode nil t)
(setq mode-line-invisible--buf-state
(buffer-local-set-state mode-line-format nil)))
(remove-hook 'after-change-major-mode-hook #'mode-line-invisible-mode t)
;; Restore buffer mode line if buffer had one by default
(when mode-line-invisible--buf-state
(setq mode-line-invisible--buf-state
(buffer-local-restore-state mode-line-invisible--buf-state)))
;; Otherwise display one
(unless mode-line-format
(setq-local mode-line-format (default-value 'mode-line-format)))
;; Update mode line
(when (called-interactively-p 'any)
(force-mode-line-update))))