Next: , Previous: , Up: Word Abbreviation   [Contents][Index]


6.8.1 Basic Commands

Command: Abbrev Mode

This command turns on Abbrev mode in the current buffer. If Abbrev mode is already on, it is turned off. Abbrev mode must be on for the automatic expansion of word abbrevs to occur, but the abbreviation commands are bound globally and may be used at any time.

Command: Abbrev Expand Only stuff (bound to word-delimiters in Abbrev mode)

This is the word abbrev expansion command. If the word before the point is a defined word abbrev, then it is replaced with its expansion. The replacement is done using the same case-preserving heuristic as is used by Query Replace. This command is globally bound to M-Space so that abbrevs can be expanded when Abbrev mode is off. An undesirable expansion may be inhibited by using C-q to insert the delimiter.

Command: Inverse Add Global Word Abbrev (bound to C-x -)
Command: Inverse Add Mode Word Abbrev (bound to C-x C-h, C-x Backspace)

Inverse Add Global Word Abbrev prompts for a string and makes it the global word abbrev expansion for the word before the point.

Inverse Add Mode Word Abbrev is identical to Inverse Add Global Word Abbrev except that it defines an expansion which is local to the current major mode.

Command: Make Word Abbrev

This command defines an arbitrary word abbreviation. It prompts for the mode, abbreviation and expansion. If the mode "Global" is specified, then it makes a global abbrev.

Command: Add Global Word Abbrev (bound to C-x +)
Command: Add Mode Word Abbrev (bound to C-x C-a)

Add Global Word Abbrev prompts for a word and defines it to be a global word abbreviation. The prefix argument determines which text is used as the expansion:

no prefix argument

The word before the point is used as the expansion of the abbreviation.

zero prefix argument

The text in the region is used as the expansion of the abbreviation.

positive prefix argument

That many words before the point are made the expansion of the abbreviation.

negative prefix argument

Do the same thing as Delete Global Word Abbrev instead of defining an abbreviation.

Add Mode Word Abbrev is identical to Add Global Word Abbrev except that it defines or deletes mode word abbrevs in the current major mode.

Command: Word Abbrev Prefix Mark (bound to M-")

This command allows Abbrev Expand Only to recognize abbreviations when they have prefixes attached. First type the prefix, then use this command. A hyphen (-) will be inserted in the buffer. Now type the abbreviation and the word delimiter. Abbrev Expand Only will expand the abbreviation and remove the hyphen.

Note that there is no need for a suffixing command, since Abbrev Expand Only may be used explicitly by typing M-Space.

Command: Unexpand Last Word (bound to C-x u)

This command undoes the last word abbrev expansion. If repeated, undoes its own effect.


Next: Word Abbrev Files, Previous: Word Abbreviation, Up: Word Abbreviation   [Contents][Index]