describe-mode function provides information about major
modes. It is normally bound to C-h m. It uses the value of the
major-mode (see Major Modes), which is why every
major mode command needs to set that variable.
This command displays the documentation of the current buffer's major mode and minor modes. It uses the
documentationfunction to retrieve the documentation strings of the major and minor mode commands (see Accessing Documentation).
If called from Lisp with a non-
nilbuffer argument, this function displays the documentation for that buffer's major and minor modes, rather than those of the current buffer.