comparison man/abbrevs.texi @ 42492:a5636409941f

Describe define-global-abbrev and define-mode-abbrev.
author Richard M. Stallman <rms@gnu.org>
date Thu, 03 Jan 2002 05:19:26 +0000
parents 6407171bcdde
children 2a8850f484eb d7ddb3e565de
comparison
equal deleted inserted replaced
42491:0be46fec7fc2 42492:a5636409941f
80 @item C-x a i g 80 @item C-x a i g
81 Define a word in the buffer as an abbrev (@code{inverse-add-global-abbrev}). 81 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.
88 @end table 92 @end table
89 93
118 (@code{inverse-add-global-abbrev}) instead of @kbd{C-x a g}, or use 122 (@code{inverse-add-global-abbrev}) instead of @kbd{C-x a g}, or use
119 @kbd{C-x a i l} (@code{inverse-add-mode-abbrev}) instead of @kbd{C-x a 123 @kbd{C-x a i l} (@code{inverse-add-mode-abbrev}) instead of @kbd{C-x a
120 l}. These commands are called ``inverse'' because they invert the 124 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).
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.
123 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.
127 138