Go to the first, previous, next, last section, table of contents.
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
expression (make-vector len)
and want to check that you are using
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 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 function name for C-h f to describe has a default which is
used if you type RET leaving the minibuffer empty. The default is
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
make-vector
.
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 w command RET tells you what keys are bound to
command. It prints a list of the keys in the echo area. If it
says the command is not on any key, you must use M-x to run it.
C-h w runs the command where-is
.
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 section Variables.
Go to the first, previous, next, last section, table of contents.