describe-mode function is used to provide information
about major modes. It is normally called with C-h m. The
describe-mode function uses the value of
which is why every major mode function needs to set the
This function displays the documentation of the current major mode.
describe-modefunction calls the
documentationfunction using the value of
major-modeas an argument. Thus, it displays the documentation string of the major mode function. (See Accessing Documentation.)
This buffer-local variable holds the symbol for the current buffer's major mode. This symbol should have a function definition that is the command to switch to that major mode. The
describe-modefunction uses the documentation string of the function as the documentation of the major mode.