Next: , Previous: , Up: Abbrevs   [Contents][Index]


23.3 Examining and Editing Abbrevs

M-x list-abbrevs

Print a list of all abbrev definitions.

M-x edit-abbrevs

Edit a list of abbrevs; you can add, alter, or remove definitions.

The output from M-x list-abbrevs looks like this:

(lisp-mode-abbrev-table)
"dk"           0    "define-key"
(global-abbrev-table)
"dfn"          0    "definition"

(Some blank lines of no semantic significance, and some other abbrev tables, have been omitted.)

A line containing a name in parentheses is the header for abbrevs in a particular abbrev table; global-abbrev-table contains all the global abbrevs, and the other abbrev tables that are named after major modes contain the mode-specific abbrevs.

Within each abbrev table, each non-blank line defines one abbrev. The word at the beginning is the abbrev. The number that appears is the number of times the abbrev has been expanded. Emacs keeps track of this to help you see which abbrevs you actually use, in case you want to eliminate those that you don’t use often. The string at the end of the line is the expansion.

M-x edit-abbrevs allows you to add, change or kill abbrev definitions by editing a list of them in an Emacs buffer. The list has the format described above. The buffer of abbrevs is called ‘*Abbrevs*’, and is in Edit-Abbrevs mode. This mode redefines the key C-c C-c to install the abbrev definitions as specified in the buffer. The edit-abbrevs-redefine command does this. Any abbrevs not described in the buffer are eliminated when this is done.

edit-abbrevs is actually the same as list-abbrevs, except that it selects the buffer ‘*Abbrevs*’ whereas list-abbrevs merely displays it in another window.


Next: , Previous: , Up: Abbrevs   [Contents][Index]