22.4.3 The Top Level of Mode Line Control

The value of this variable is a mode line construct that controls the
contents of the mode-line. It is always buffer-local in all buffers.

If you set this variable to nil in a buffer, that buffer does not
have a mode line. (A window that is just one line tall also does not
display a mode line.)

The default value of mode-line-format is designed to use the
values of other variables such as mode-line-position and
mode-line-modes (which in turn incorporates the values of the
variables mode-name and minor-mode-alist). Very few
modes need to alter mode-line-format itself. For most
purposes, it is sufficient to alter some of the variables that
mode-line-format either directly or indirectly refers to.

If you do alter mode-line-format itself, the new value should
use the same variables that appear in the default value (see Mode Line Variables), rather than duplicating their contents or displaying
the information in another fashion. This way, customizations made by
the user or by Lisp programs (such as display-time and major
modes) via changes to those variables remain effective.

Here is a hypothetical example of a mode-line-format that might
be useful for Shell mode (in reality, Shell mode does not set
mode-line-format):