comparison lispref/abbrevs.texi @ 60260:a8e0abd18501

(Abbrev Expansion): Clarify, fix typo.
author Richard M. Stallman <rms@gnu.org>
date Sat, 26 Feb 2005 23:47:22 +0000
parents f3448e5d371d
children e836425ee789 e4694597cbf4
comparison
equal deleted inserted replaced
60259:04c26ff29449 60260:a8e0abd18501
267 function returns @code{nil} as its value, then @code{expand-abbrev} 267 function returns @code{nil} as its value, then @code{expand-abbrev}
268 returns @code{nil} even though expansion did occur. 268 returns @code{nil} even though expansion did occur.
269 @end deffn 269 @end deffn
270 270
271 @deffn Command abbrev-prefix-mark &optional arg 271 @deffn Command abbrev-prefix-mark &optional arg
272 This command marks current point as the beginning of an abbrev. The 272 This command marks the current location of point as the beginning of
273 next call to @code{expand-abbrev} will use the text from here to point 273 an abbrev. The next call to @code{expand-abbrev} will use the text
274 (where it is then) as the abbrev to expand, rather than using the 274 from here to point (where it is then) as the abbrev to expand, rather
275 previous word as usual. 275 than using the previous word as usual.
276 276
277 First, this command expands any abbrev before point, unless @var{arg} 277 First, this command expands any abbrev before point, unless @var{arg}
278 is non-@code{nil}. (Interactively, @var{arg} is the prefix argument.) 278 is non-@code{nil}. (Interactively, @var{arg} is the prefix argument.)
279 Then it inserts a hyphen before point, to indicate the start of the 279 Then it inserts a hyphen before point, to indicate the start of the
280 next abbrev to be expanded. The actual expansion removes the hyphen. 280 next abbrev to be expanded. The actual expansion removes the hyphen.
361 (add-hook 'pre-abbrev-expand-hook 361 (add-hook 'pre-abbrev-expand-hook
362 'foo-mode-pre-abbrev-expand 362 'foo-mode-pre-abbrev-expand
363 nil t))) 363 nil t)))
364 @end smallexample 364 @end smallexample
365 365
366 Note that @code{foo-mode-pre-abbrex-expand} just returns @code{nil} 366 Note that @code{foo-mode-pre-abbrev-expand} just returns @code{nil}
367 without doing anything for lines not starting with @samp{#}. Hence 367 without doing anything for lines not starting with @samp{#}. Hence
368 abbrevs expand normally using @code{foo-mode-abbrev-table} as local 368 abbrevs expand normally using @code{foo-mode-abbrev-table} as local
369 abbrev table for such lines. 369 abbrev table for such lines.
370 370
371 @node Standard Abbrev Tables, , Abbrev Expansion, Abbrevs 371 @node Standard Abbrev Tables, , Abbrev Expansion, Abbrevs