| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Abbrevs are usually expanded by certain interactive commands,
including self-insert-command. This section describes the
subroutines used in writing such commands, as well as the variables they
use for communication.
nil if that abbrev is not
defined. The optional second argument table is the abbrev table
to look it up in. If table is nil, this function tries
first the current buffer's local abbrev table, and second the global
abbrev table.
abbrev-symbol.
nil otherwise.
If the abbrev symbol has a hook function which is a symbol whose
no-self-insert property is non-nil, and if the hook
function returns nil as its value, then expand-abbrev
returns nil even though expansion did occur.
expand-abbrev will use the text from here to point (where it is
then) as the abbrev to expand, rather than using the previous word as
usual.
nil, an abbrev entered entirely in upper
case is expanded using all upper case. Otherwise, an abbrev entered
entirely in upper case is expanded by capitalizing each word of the
expansion.
expand-abbrev to use as the start
of the next abbrev to be expanded. (nil means use the word
before point instead.) abbrev-start-location is set to
nil each time expand-abbrev is called. This variable is
also set by abbrev-prefix-mark.
abbrev-start-location has been set. Trying to expand an abbrev
in any other buffer clears abbrev-start-location. This variable
is set by abbrev-prefix-mark.
abbrev-symbol of the most recent abbrev expanded. This
information is left by expand-abbrev for the sake of the
unexpand-abbrev command (see section `Expanding Abbrevs' in The GNU Emacs Manual).
expand-abbrev for the sake of the
unexpand-abbrev command.
nil if the abbrev
has already been unexpanded. This contains information left by
expand-abbrev for the sake of the unexpand-abbrev command.
expand-abbrev does, and
so a hook function can be used to change the current abbrev table before
abbrev lookup happens.
The following sample code shows a simple use of
pre-abbrev-expand-hook. If the user terminates an abbrev with a
punctuation character, the hook function asks for confirmation. Thus,
this hook allows the user to decide whether to expand the abbrev, and
aborts expansion if it is not confirmed.
(add-hook 'pre-abbrev-expand-hook 'query-if-not-space) ;; This is the function invoked by |
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |