www.delorie.com/gnu/docs/elisp-manual-21/elisp_594.html   search  
Buy the book!

GNU Emacs Lisp Reference Manual

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

36. Abbrevs and Abbrev Expansion

An abbreviation or abbrev is a string of characters that may be expanded to a longer string. The user can insert the abbrev string and find it replaced automatically with the expansion of the abbrev. This saves typing.

The set of abbrevs currently in effect is recorded in an abbrev table. Each buffer has a local abbrev table, but normally all buffers in the same major mode share one abbrev table. There is also a global abbrev table. Normally both are used.

An abbrev table is represented as an obarray containing a symbol for each abbreviation. The symbol's name is the abbreviation; its value is the expansion; its function definition is the hook function to do the expansion (see section 36.3 Defining Abbrevs); its property list cell contains the use count, the number of times the abbreviation has been expanded. Because these symbols are not interned in the usual obarray, they will never appear as the result of reading a Lisp expression; in fact, normally they are never used except by the code that handles abbrevs. Therefore, it is safe to use them in an extremely nonstandard way. See section 8.3 Creating and Interning Symbols.

For the user-level commands for abbrevs, see section `Abbrev Mode' in The GNU Emacs Manual.

36.1 Setting Up Abbrev Mode  Setting up Emacs for abbreviation.
36.2 Abbrev Tables  Creating and working with abbrev tables.
36.3 Defining Abbrevs  Specifying abbreviations and their expansions.
36.4 Saving Abbrevs in Files  Saving abbrevs in files.
36.5 Looking Up and Expanding Abbreviations  Controlling expansion; expansion subroutines.
36.6 Standard Abbrev Tables  Abbrev tables used by various major modes.

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

  webmaster   donations   bookstore     delorie software   privacy  
  Copyright 2003   by The Free Software Foundation     Updated Jun 2003