C-h x command RET (
displays the documentation of the named command, in a
window. For example,
C-h x auto-fill-mode RET
displays the documentation of
auto-fill-mode. This is how you
would get the documentation of a command that is not bound to any key
(one which you would normally run using M-x).
C-h f function RET (
displays the documentation of Lisp function. This command is
intended for Lisp functions that you use in a Lisp program. For
example, if you have just written the expression
(make-vector len) and want to check that you are using
make-vector properly, type C-h f make-vector RET.
Additionally, since all commands are Lisp functions, you can also use
this command to view the documentation of any command.
If you type C-h f RET, it describes the function called
by the innermost Lisp expression in the buffer around point,
provided that function name is a valid, defined Lisp function.
(That name appears as the default while you enter the argument.) For
example, if point is located following the text ‘(make-vector
(car x)’, the innermost list containing point is the one that starts
with ‘(make-vector’, so C-h f RET describes the
C-h f is also useful just to verify that you spelled a function name correctly. If the minibuffer prompt for C-h f shows the function name from the buffer as the default, it means that name is defined as a Lisp function. Type C-g to cancel the C-h f command if you don’t really want to view the documentation.
If you request help for an autoloaded function whose
form (see Autoload in The Emacs Lisp Reference Manual)
doesn’t provide a doc string, the *Help* buffer won’t have any
doc string to display. In that case, if
help-enable-symbol-autoload is non-
nil, Emacs will try
to load the file in which the function is defined to see whether
there’s a doc string there.
You can get an overview of functions relevant for a particular topic
by using the M-x shortdoc-display-group command. This will
prompt you for an area of interest, e.g.,
string, and pop you
to a buffer where many of the functions relevant for handling strings
C-h v (
describe-variable) is like C-h f but
describes Lisp variables instead of Lisp functions. Its default is
the Lisp symbol around or before point, if that is the name of a
defined Lisp variable. See Variables.
Help buffers that describe Emacs variables and functions normally have hyperlinks to the corresponding source code, if you have the source files installed (see Hyperlinking and Web Navigation Features).
To find a command’s documentation in a manual, use C-h F
Info-goto-emacs-command-node). This knows about various
manuals, not just the Emacs manual, and finds the right one.
C-h o (
describe-symbol) is like C-h f and
C-h v, but it describes any symbol, be it a function, a
variable, or a face. If the symbol has more than one definition, like
it has both definition as a function and as a variable, this command
will show the documentation of all of them, one after the other.
completions-detailed user option is non-
some commands provide details about the possible values when
displaying completions. For instance, C-h o TAB will then
include the first line of the doc string, and will also say whether
each symbol is a function or a variable (and so on). Which details
are included varies depending on the command used.