Skeletons are an shorthand extension to the Lisp language, where various
atoms directly perform either actions on the current buffer or rudimentary
flow control mechanisms. Skeletons are interpreted by the function
A skeleton is a list starting with an interactor, which is usually a
nil when not needed, but can also be a Lisp
expression for complex read functions or for returning some calculated value.
The rest of the list are any number of elements as described in the following
skeleton-transformationwhen that is non-
?\nto prevent alignment. Use
"\n"as the first or last string element of a skeleton to insert a newline unconditionally.
_where nothing is wrapped.
_, and there is a interregion that will be wrapped here, indent that interregion.
strin the subskeleton. They can also be used non-interactively, when prompt is a lisp-expression that returns successive list-elements.
resume:section was entered because the user quit.
Some modes also use other skeleton elements they themselves defined. For
example in shell script mode's skeletons you will find
< which does a
rigid indentation backwards, or in CC mode's skeletons you find the
}. These are defined by the
skeleton-further-elements which is a list of
variables bound while interpreting a skeleton.
define-skeleton defines a command for interpreting a
skeleton. The first argument is the command name, the second is a
documentation string, and the rest is an interactor and any number of skeleton
elements together forming a skeleton. This skeleton is assigned to a variable
of the same name as the command and can thus be overridden from your
~/.emacs file (see Init File).