11.3 Help by Command or Variable Name
C-h f (
describe-function) reads the name of a Lisp function
using the minibuffer, then displays that function's documentation string
in a window. Since commands are Lisp functions, you can use this to get
the documentation of a command that you know by name. For example,
C-h f auto-fill-mode <RET>
displays the documentation of
auto-fill-mode. This is the only
way to 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 is also useful for Lisp functions that you are planning
to use in a Lisp program. For example, if you have just written the
(make-vector len) and want to check that you are
make-vector properly, type C-h f make-vector
<RET>. Because C-h f allows all function names, not just
command names, you may find that some of your favorite completion
abbreviations that work in M-x don't work in C-h f. An
abbreviation may be unique among command names, yet fail to be unique
when other function names are allowed.
The default function name for C-h f to describe, if you type
just <RET>, is the name of the function called by the innermost Lisp
expression in the buffer around point, provided that is a valid,
defined Lisp function name. 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 the default is
to describe the function
C-h f is often useful just to verify that you have the right
spelling for the function name. If C-h f mentions a name from the
buffer as the default, that name must be defined as a Lisp function. If
that is all you want to know, just type C-g to cancel the C-h
f command, then go on editing.
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, but only if that is the name of a known Lisp
variable. See Variables.
Help buffers describing Emacs variables and functions normally have
hyperlinks to the definition, if you have the source files installed.
(See Hyperlinking.) If you know Lisp (or C), this provides the
ultimate documentation. If you don't know Lisp, you should learn it.
If you are just using Emacs, treating Emacs as an object
(file), then you don't really love it. For true intimacy with your
editor, you need to read the source code.