diff options
| author | Richard M. Stallman | 2002-01-03 05:19:26 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2002-01-03 05:19:26 +0000 |
| commit | 387ac9c17c522c7f27c910bd967e4d56c8b5cf25 (patch) | |
| tree | 5a511a2846c60854beff2c8b513e0c0079274749 | |
| parent | 0c5e191f50147bc23c47f0b2f23f167e47560ff1 (diff) | |
| download | emacs-387ac9c17c522c7f27c910bd967e4d56c8b5cf25.tar.gz emacs-387ac9c17c522c7f27c910bd967e4d56c8b5cf25.zip | |
Describe define-global-abbrev and define-mode-abbrev.
| -rw-r--r-- | man/abbrevs.texi | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/man/abbrevs.texi b/man/abbrevs.texi index 1a6b81d971e..d05d257c6ed 100644 --- a/man/abbrevs.texi +++ b/man/abbrevs.texi | |||
| @@ -82,6 +82,10 @@ Define a word in the buffer as an abbrev (@code{inverse-add-global-abbrev}). | |||
| 82 | @item C-x a i l | 82 | @item C-x a i l |
| 83 | Define a word in the buffer as a mode-specific abbrev | 83 | Define a word in the buffer as a mode-specific abbrev |
| 84 | (@code{inverse-add-mode-abbrev}). | 84 | (@code{inverse-add-mode-abbrev}). |
| 85 | @item M-x define-global-abbrev @key{RET} @var{abbrev} @key{RET} @var{exp} @key{RET} | ||
| 86 | Define @var{abbrev} as an abbrev expanding into @var{exp}. | ||
| 87 | @item M-x define-mode-abbrev @key{RET} @var{abbrev} @key{RET} @var{exp} @key{RET} | ||
| 88 | Define @var{abbrev} as a mode-specific abbrev expanding into @var{exp}. | ||
| 85 | @item M-x kill-all-abbrevs | 89 | @item M-x kill-all-abbrevs |
| 86 | This command discards all abbrev definitions currently in effect, | 90 | This command discards all abbrev definitions currently in effect, |
| 87 | leaving a blank slate. | 91 | leaving a blank slate. |
| @@ -121,6 +125,13 @@ l}. These commands are called ``inverse'' because they invert the | |||
| 121 | meaning of the two text strings they use (one from the buffer and one | 125 | meaning of the two text strings they use (one from the buffer and one |
| 122 | read with the minibuffer). | 126 | read with the minibuffer). |
| 123 | 127 | ||
| 128 | @findex define-mode-abbrev | ||
| 129 | @findex define-global-abbrev | ||
| 130 | You can define an abbrev without inserting either the abbrev or its | ||
| 131 | expansion in the buffer using the command @code{define-global-abbrev}. | ||
| 132 | It reads two arguments--the abbrev, and its expansion. The command | ||
| 133 | @code{define-mode-abbrev} does likewise for a mode-specific abbrev. | ||
| 134 | |||
| 124 | To change the definition of an abbrev, just define a new definition. | 135 | To change the definition of an abbrev, just define a new definition. |
| 125 | When the abbrev has a prior definition, the abbrev definition commands | 136 | When the abbrev has a prior definition, the abbrev definition commands |
| 126 | ask for confirmation before replacing it. | 137 | ask for confirmation before replacing it. |