elisp: Abbrev Tables
35.1 Abbrev Tables
==================
This section describes how to create and manipulate abbrev tables.
-- Function: make-abbrev-table &optional props
This function creates and returns a new, empty abbrev table—an
obarray containing no symbols. It is a vector filled with zeros.
PROPS is a property list that is applied to the new table (
Abbrev Table Properties).
-- Function: abbrev-table-p object
This function returns a non-‘nil’ value if OBJECT is an abbrev
table.
-- Function: clear-abbrev-table abbrev-table
This function undefines all the abbrevs in ABBREV-TABLE, leaving it
empty.
-- Function: copy-abbrev-table abbrev-table
This function returns a copy of ABBREV-TABLE—a new abbrev table
containing the same abbrev definitions. It does _not_ copy any
property lists; only the names, values, and functions.
-- Function: define-abbrev-table tabname definitions &optional
docstring &rest props
This function defines TABNAME (a symbol) as an abbrev table name,
i.e., as a variable whose value is an abbrev table. It defines
abbrevs in the table according to DEFINITIONS, a list of elements
of the form ‘(ABBREVNAME EXPANSION [HOOK] [PROPS...])’. These
elements are passed as arguments to ‘define-abbrev’.
The optional string DOCSTRING is the documentation string of the
variable TABNAME. The property list PROPS is applied to the abbrev
table (Abbrev Table Properties).
If this function is called more than once for the same TABNAME,
subsequent calls add the definitions in DEFINITIONS to TABNAME,
rather than overwriting the entire original contents. (A
subsequent call only overrides abbrevs explicitly redefined or
undefined in DEFINITIONS.)
-- Variable: abbrev-table-name-list
This is a list of symbols whose values are abbrev tables.
‘define-abbrev-table’ adds the new abbrev table name to this list.
-- Function: insert-abbrev-table-description name &optional human
This function inserts before point a description of the abbrev
table named NAME. The argument NAME is a symbol whose value is an
abbrev table.
If HUMAN is non-‘nil’, the description is human-oriented. System
abbrevs are listed and identified as such. Otherwise the
description is a Lisp expression—a call to ‘define-abbrev-table’
that would define NAME as it is currently defined, but without the
system abbrevs. (The mode or package using NAME is supposed to add
these to NAME separately.)