*** empty log message ***
[bpt/emacs.git] / man / autotype.texi
CommitLineData
af372af6
DL
1\input texinfo
2@c This is an annex of the Emacs manual.
3241b756
DL
3@c Copyright (C) 1994, 1995 Free Software Foundation, Inc.
4@c Author: Daniel.Pfeiffer@Informatik.START.dbp.de, fax (+49 69) 7588-2389
5@c See file emacs.texi for copying conditions.
af372af6
DL
6@setfilename ../info/autotype
7@c @node Autotypist, Picture, Abbrevs, Top
8@c @chapter Features for Automatic Typing
9@settitle Features for Automatic Typing
10@c @cindex text
11@c @cindex selfinserting text
12@c @cindex autotypist
3241b756
DL
13
14@dircategory Editors
15@direntry
16* Autotype: (autotype). Convenient features for text that you enter frequently
17 in Emacs.
18@end direntry
19
af372af6
DL
20@ifinfo
21Copyright @copyright{} 1994, 1995, 1999 Free Software Foundation, Inc.
22@end ifinfo
23
24
25@titlepage
26@sp 10
27
28@center @titlefont{Autotyping}
29@sp 2
30@center @subtitlefont{Convenient features for text that you enter
31frequently in Emacs}
32@sp 2
33@center Daniel Pfeiffer
34@center additions by Dave Love
35
36@page
37@vskip 0pt plus 1filll
38Copyright @copyright{} 1994, 1995, 1999 Free Software Foundation, Inc.
39@end titlepage
40
41@node Top
42@top Autotyping
43
3241b756
DL
44 Under certain circumstances you will find yourself typing similar things
45over and over again. This is especially true of form letters and programming
46language constructs. Project-specific header comments, flow-control
47constructs or magic numbers are essentially the same every time. Emacs has
af372af6
DL
48various features for doing tedious and repetitive typing chores for you
49in addition to the Abbrev features (@pxref{(emacs)Abbrevs}).
3241b756
DL
50
51 One solution is using skeletons, flexible rules that say what to
52insert, and how to do it. Various programming language modes offer some
53ready-to-use skeletons, and you can adapt them to suit your needs or
54taste, or define new ones.
55
56 Another feature is automatic insertion of what you want into empty files,
57depending on the file-name or the mode as appropriate. You can have a file or
58a skeleton inserted, or you can call a function. Then there is the
59possibility to have Un*x interpreter scripts automatically take on a magic
60number and be executable as soon as they are saved. Or you can have a
af372af6
DL
61copyright notice's year updated, if necessary, every time you save a
62file. Similarly for time stamps in the file.
63
64 URLs can be inserted based on a word at point. Flexible templates can
65be defined for inserting and navigating between text more generally. A
66sort of meta-expansion facility can be used to try a set of alternative
67completions and expansions of text at point.
3241b756
DL
68
69@menu
70* Using Skeletons:: How to insert a skeleton into your text.
71* Wrapping Skeletons:: Putting existing text within a skeleton.
72* Skeletons as Abbrevs:: An alternative for issuing skeleton commands.
73* Skeleton Language:: Making skeleton commands insert what you want.
af372af6
DL
74* Inserting Pairs:: Typing one character and getting another
75 after point.
3241b756
DL
76* Autoinserting:: Filling up empty files as soon as you visit them.
77* Copyrights:: Inserting and updating copyrights.
78* Executables:: Turning interpreter scripts into executables.
af372af6
DL
79* Timestamps:: Updating dates and times in modified files.
80* QuickURL:: Inserting URLs based on text at point.
81* Tempo:: Flexible template insertion.
82* Hippie Expand:: Expansion of text trying various methods.
83
84* Concept Index::
85* Command Index::
86* Variable Index::
3241b756
DL
87@end menu
88
89
90
91@node Using Skeletons
af372af6 92@chapter Using Skeletons
3241b756
DL
93@cindex skeletons
94@cindex using skeletons
95
96 When you want Emacs to insert a form letter or a typical construct of the
97programming language you are using, skeletons are a means of accomplishing
98this. Normally skeletons each have a command of their own, that, when called,
99will insert the skeleton. These commands can be issued in the usual ways
af372af6
DL
100(@xref{(emacs)Commands}). Modes that offer various skeletons will often
101bind these to key-sequences on the @kbd{C-c} prefix, as well as having
102an @cite{Insert} menu and maybe even predefined abbrevs for them
103(@xref{Skeletons as Abbrevs}).
3241b756
DL
104
105 The simplest kind of skeleton will simply insert some text indented
106according to the major mode and leave the cursor at a likely place in the
107middle. Interactive skeletons may prompt you for a string that will be part
108of the inserted text.
109
110 Skeletons may ask for input several times. They even have a looping
111mechanism in which you will be asked for input as long as you are willing to
112furnish it. An example would be multiple ``else if'' conditions. You can
113recognize this situation by a prompt ending in ``RET, C-g or C-h''. This
114means that entering an empty string will simply assume that you are finished.
115Typing quit on the other hand terminates the loop but also the rest of the
116skeleton, e.g. an ``else'' clause is skipped. Only a syntactically necessary
117termination still gets inserted.
118
119
120
121@node Wrapping Skeletons
af372af6 122@chapter Wrapping Skeletons Around Existing Text
3241b756
DL
123@cindex wrapping skeletons
124
125 Often you will find yourself with some code that for whatever reason
126suddenly becomes conditional. Or you have written a bit of text and want to
127put it in the middle of a form letter. Skeletons provide a means for
128accomplishing this, and can even, in the case of programming languages,
129reindent the wrapped code for you.
130
131 Skeleton commands take an optional numeric prefix argument
af372af6 132(@xref{(emacs)Arguments}). This is interpreted in two different ways depending
3241b756
DL
133on whether the prefix is positive, i.e. forwards oriented or negative,
134i.e. backwards oriented.
135
af372af6
DL
136 A positive prefix means to wrap the skeleton around that many
137following words. This is accomplished by putting the words there where
138the point is normally left after that skeleton is inserted (@xref{Using
139Skeletons}). The point (@xref{(emacs)Point}) is left at the next
140interesting spot in the skeleton instead.
3241b756
DL
141
142 A negative prefix means to do something similar with that many precedingly
af372af6 143marked interregions (@xref{(emacs)Mark}). In the simplest case, if you type
3241b756
DL
144@kbd{M--} just before issuing the skeleton command, that will wrap the
145skeleton around the current region, just like a positive argument would have
146wrapped it around a number of words.
147
148 Smaller negative arguments will wrap that many interregions into successive
149interesting spots within the skeleton, again leaving the point at the next one.
150We speak about interregions rather than regions here, because we treat them in
151the order they appear in the buffer, which coincides with successive regions
152only if they were marked in order.
153
154 That is, if you marked in alphabetical order the points A B C [] (where []
155represents the point) and call a skeleton command with @kbd{M-- 3}, you will
156wrap the text from A to B into the first interesting spot of the skeleton, the
157text from B to C into the next one, the text from C to the point into the
158third one, and leave the point in the fourth one. If there are less marks in
159the buffer, or if the skeleton defines less interesting points, the surplus is
160ignored.
161
162 If, on the other hand, you marked in alphabetical order the points [] A C B,
163and call a skeleton command with @kbd{M-- 3}, you will wrap the text from
164point to A, then the text from A to C and finally the text from C to B. This
165is done because the regions overlap and Emacs would be helplessly lost if it
166tried to follow the order in which you marked these points.
167
168
169
170@node Skeletons as Abbrevs
af372af6 171@chapter Skeletons as Abbrev Expansions
3241b756
DL
172@cindex skeletons as abbrevs
173
af372af6
DL
174 Rather than use a keybinding for every skeleton command, you can also
175define an abbreviation (@xref{(emacs)Defining Abbrevs}) that will expand
176(@xref{(emacs)Expanding Abbrevs}) into the skeleton.
3241b756
DL
177
178 Say you want @samp{ifst} to be an abbreviation for the C language if
179statement. You will tell Emacs that @samp{ifst} expands to the empty string
180and then calls the skeleton command. In Emacs-lisp you can say something like
181@code{(define-abbrev c-mode-abbrev-table "ifst" "" 'c-if)}. Or you can edit
182the output from @kbd{M-x list-abbrevs} to make it look like this:
183
184@example
185(c-mode-abbrev-table)
186"if" 0 "" c-if
187@end example
188
189@noindent
190(Some blank lines of no semantic significance, and other abbrev tables,
191have been omitted.)
192
193
194
195@node Skeleton Language
af372af6 196@chapter Skeleton Language
3241b756
DL
197@cindex skeleton language
198
199@findex skeleton-insert
200 Skeletons are an shorthand extension to the Lisp language, where various
201atoms directly perform either actions on the current buffer or rudimentary
202flow control mechanisms. Skeletons are interpreted by the function
203@code{skeleton-insert}.
204
205 A skeleton is a list starting with an interactor, which is usually a
206prompt-string, or @code{nil} when not needed, but can also be a Lisp
207expression for complex read functions or for returning some calculated value.
208The rest of the list are any number of elements as described in the following
209table:
210
211@table @code
212@item "string", ?c, ?\c
213@vindex skeleton-transformation
214Insert string or character. Literal strings and characters are passed through
215@code{skeleton-transformation} when that is non-@code{nil}.
216@item \n
217Insert a newline and align under current line. Use newline character
218@code{?\n} to prevent alignment.
219@item _
220Interesting point. When wrapping skeletons around successive regions, they are
221put at these places. Point is left at first @code{_} where nothing is wrapped.
222@item >
223Indent line according to major mode. When following element is @code{_}, and
224there is a interregion that will be wrapped here, indent that interregion.
225@item &
226Logical and. Iff preceding element moved point, i.e. usually inserted
227something, do following element.
228@item |
229Logical xor. Iff preceding element didn't move point, i.e. usually inserted
230nothing, do following element.
231@item -number
232Delete preceding number characters. Depends on value of
233@code{skeleton-untabify}.
234@item (), nil
235Ignored.
236@item lisp expression
237Evaluated, and the return value is again interpreted as a skeleton element.
238@item str
239A special variable that, when evaluated the first time, usually prompts
240for input according to the skeleton's interactor. It is then set to the
241return value resulting from the interactor. Each subskeleton has its local
242copy of this variable.
243@item v1, v2
244Skeleton-local user variables.
245@item '
246Evaluate following lisp expression for its side-effect, but prevent it from
247being interpreted as a skeleton element.
248@item skeleton
249Subskeletons are inserted recursively, not once, but as often as the user
250enters something at the subskeletons interactor. Thus there must be a
251@code{str} in the subskeleton. They can also be used non-interactively, when
252prompt is a lisp-expression that returns successive list-elements.
253@item resume:
254Ignored. Execution resumes here when the user quit during skeleton
255interpretation.
256@item quit
257A constant which is non-@code{nil} when the @code{resume:} section was entered
258because the user quit.
259@end table
260
261@findex skeleton-further-elements
262 Some modes also use other skeleton elements they themselves defined. For
263example in shell script mode's skeletons you will find @code{<} which does a
264rigid indentation backwards, or in cc-mode's skeletons you find the
265self-inserting elements @code{@{} and @code{@}}. These are defined by the
266buffer-local variable @code{skeleton-further-elements} which is a list of
267variables bound while interpreting a skeleton.
268
269@findex define-skeleton
270 The macro @code{define-skeleton} defines a command for interpreting a
271skeleton. The first argument is the command name, the second is a
272documentation string, and the rest is an interactor and any number of skeleton
273elements together forming a skeleton. This skeleton is assigned to a variable
274of the same name as the command and can thus be overridden from your
af372af6 275@file{~/.emacs} file (@xref{(emacs)Init File}).
3241b756
DL
276
277
278
279@node Inserting Pairs
af372af6 280@chapter Inserting Matching Pairs of Characters
3241b756
DL
281@cindex inserting pairs
282@cindex pairs
283
284 Various characters usually appear in pairs. When, for example, you insert
285an open parenthesis, no matter whether you are programming or writing prose,
286you will surely enter a closing one later. By entering both at the same time
287and leaving the cursor inbetween, Emacs can guarantee you that such
288parentheses are always balanced. And if you have a non-qwerty keyboard, where
289typing some of the stranger programming language symbols makes you bend your
290fingers backwards, this can be quite relieving too.
291
292@findex pair-insert-maybe
293@vindex pair
af372af6
DL
294 This is done by binding the first key (@xref{(emacs)Rebinding}) of the
295pair to @code{pair-insert-maybe} instead of @code{self-insert-command}.
296The maybe comes from the fact that this at first surprising behaviour is
297initially turned off. To enable it, you must set @code{pair} to some
298non-@code{nil} value. And even then, a positive argument
299(@xref{(emacs)Arguments}) will make this key behave like a self
300inserting key (@xref{(emacs)Inserting Text}).
3241b756
DL
301
302@findex pair-on-word
303 While this breaks with the stated intention of always balancing pairs, it
304turns out that one often doesn't want pairing to occur, when the following
305character is part of a word. If you want pairing to occur even then, set
306@code{pair-on-word} to some non-@code{nil} value.
307
308@vindex pair-alist
309 Pairing is possible for all visible characters. By default the parenthesis
310`(', the square bracket `[', the brace `@{', the pointed bracket `<' and the
311backquote ``' will all pair to the symmetrical character. All other
312characters will pair themselves. This behaviour can be modified by the
313variable @code{pair-alist}. This is in fact an alist of skeletons
314(@xref{Skeleton Language}), with the first part of each sublist matching the
315typed character. This is the position of the interactor, but since pairs
316don't need the @code{str} element, this is ignored.
317
318 Some modes have bound the command @code{pair-insert-maybe} to relevant keys.
319These modes also configure the pairs as appropriate. For example, when typing
320english prose, you'd expect the backquote (`) to pair to the quote (') while
321in Shell script mode it must pair to itself. They can also inhibit pairing
322in certain contexts. For example an escaped character will stand for itself.
323
324
325
326@node Autoinserting
af372af6 327@chapter Autoinserting Text in Empty Files
3241b756
DL
328@cindex autoinserting
329
330@findex auto-insert
331 @kbd{M-x auto-insert} will put some predefined text at the beginning of
332the buffer. The main application for this function, as its name suggests,
333is to have it be called automatically every time an empty, and only an
334empty file is visited. This is accomplished by putting @code{(add-hook
af372af6
DL
335'find-file-hooks 'auto-insert)} into your @file{~/.emacs} file
336(@xref{(emacs)Init File}).
3241b756
DL
337
338@vindex auto-insert-alist
339 What gets inserted, if anything, is determined by the variable
340@code{auto-insert-alist}. The @code{car}s of this list are each either a mode
341name, making an element applicable when a buffer is in that mode. Or they
342can be a string, which is a regexp matched against the buffer's file name.
343In that way different kinds of files that have the same mode in Emacs can be
344distinguished. The @code{car}s may also be @code{cons}-cells consisting of
345mode name or regexp as above and an additional descriptive string.
346
347 When a matching element is found, the @code{cdr} says what to do. It may
348be a string, which is a file name, whose contents are to be inserted, if
349that file is found in the directory @code{auto-insert-directory} or under a
350absolute file name. Or it can be a skeleton (@xref{Skeleton Language}) to
351be inserted.
352
353 It can also be a function, which allows doing various things. The function
354can simply insert some text, indeed, it can be skeleton command (@xref{Using
355Skeletons}). It can be a lambda function which will for example conditionally
356call another function. Or it can even reset the mode for the buffer. If you
357want to perform several such actions in order, you use a vector, i.e. several
358of the above elements between square brackets ([...]).
359
360 By default C and C++ headers insert a definition of a symbol derived from
361the filename to prevent multiple inclusions. C and C++ sources insert an
362include of the header. Makefiles insert the file makefile.inc if it exists.
363
364 TeX and bibTeX mode files insert the file tex-insert.tex if it exists, while
365LaTeX mode files insert insert a typical @code{\documentclass} frame. Html
366files insert a skeleton with the usual frame.
367
368 Ada mode files call the Ada header skeleton command. Emacs lisp source
369files insert the usual header, with a copyright of your environment variable
370@code{$ORGANIZATION} or else the FSF, and prompt for valid keywords describing
371the contents. Files in a @code{bin/} directory for which Emacs could
af372af6 372determine no specialised mode (@xref{(emacs)Choosing Modes}) are set to Shell script
3241b756
DL
373mode.
374
375@findex define-auto-insert
af372af6 376 In Lisp (@xref{(emacs)Init File}) you can use the function @code{define-auto-insert}
3241b756
DL
377to add to or modify @code{auto-insert-alist}. See its documentation with
378@kbd{C-h f auto-insert-alist}.
379
380@vindex auto-insert
381 The variable @code{auto-insert} says what to do when @code{auto-insert} is
382called non-interactively, e.g. when a newly found file is empty (see above):
383@table @code
384@item nil
385Do nothing.
386@item t
387Insert something if possible, i.e. there is a matching entry in
388@code{auto-insert-alist}.
389@item other
390Insert something if possible, but mark as unmodified.
391@end table
392
393@vindex auto-insert-query
394 The variable @code{auto-insert-query} controls whether to ask about
395inserting something. When this is @code{nil} inserting is only done with
396@kbd{M-x auto-insert}. When this is @code{'function} you are queried
397whenever @code{auto-insert} is called as a function, such as when Emacs
398visits an empty file and you have set the above-mentioned hook. Otherwise
399you are alway queried.
400
401@vindex auto-insert-prompt
402 When querying, the variable @code{auto-insert-prompt}'s value is used as a
403prompt for a y-or-n-type question. If this includes a @code{%s} construct,
404that is replaced by what caused the insertion rule to be chosen. This is
405either a descriptive text, the mode-name of the buffer or the regular
406expression that matched the filename.
407
408
409
410@node Copyrights
af372af6 411@chapter Inserting and Updating Copyrights
3241b756
DL
412@cindex copyrights
413
414@findex copyright
415 @kbd{M-x copyright} is a skeleton inserting command, that adds a copyright
416notice at the point. The ``by'' part is taken from your environment variable
417@code{$ORGANIZATION} or if that isn't set you are prompted for it. If the
af372af6 418buffer has a comment syntax (@xref{(emacs)Comments}), this is inserted as a comment.
3241b756
DL
419
420@findex copyright-update
421@vindex copyright-limit
422@vindex copyright-current-year
423 @kbd{M-x copyright-update} looks for a copyright notice in the first
424@code{copyright-limit} characters of the buffer and updates it when necessary.
425The current year (variable @code{copyright-current-year}) is added to the
426existing ones, in the same format as the preceding year, i.e. 1994, '94 or 94.
427If a dash-separated year list up to last year is found, that is extended to
428current year, else the year is added separated by a comma. Or it replaces
429them when this is called with a prefix argument. If a header referring to a
af372af6 430wrong version of the GNU General Public License (@xref{(emacs)Copying}) is found,
3241b756
DL
431that is updated too.
432
433 An interesting application for this function is to have it be called
434automatically every time a file is saved. This is accomplished by putting
435@code{(add-hook 'write-file-hooks 'copyright-update)} into your @file{~/.emacs}
af372af6 436file (@xref{(emacs)Init File}).
3241b756
DL
437
438@vindex copyright-query
439 The variable @code{copyright-query} controls whether to update the
440copyright or whether to ask about it. When this is @code{nil} updating is
441only done with @kbd{M-x copyright-update}. When this is @code{'function}
442you are queried whenever @code{copyright-update} is called as a function,
443such as in the @code{write-file-hooks} feature mentioned above. Otherwise
444you are always queried.
445
446
447
448@node Executables
af372af6 449@chapter Making Interpreter Scripts Executable
3241b756
DL
450@cindex executables
451
452@vindex executable-prefix
453@vindex executable-chmod
454 Various Un*x interpreter modes such as Shell script mode or AWK mode
455will automatically insert or update the buffer's magic number, a special
456comment on the first line that makes the @code{exec()} systemcall know how
457to execute the script. To this end the script is automatically made
458executable upon saving, with @code{executable-chmod} as argument to the
459system @code{chmod} command. The magic number is prefixed by the value of
460@code{executable-prefix}.
461
462@vindex executable-magicless-file-regexp
af372af6 463 Any file whose name matches @code{executable-magicless-file-regexp} is not
3241b756
DL
464furnished with a magic number, nor is it made executable. This is mainly
465intended for resource files, which are only meant to be read in.
466
467@vindex executable-insert
468 The variable @code{executable-insert} says what to do when
469@code{executable-set-magic} is called non-interactively, e.g. when file has no
470or the wrong magic number:
471@table @code
472@item nil
473Do nothing.
474@item t
475Insert or update magic number.
476@item other
477Insert or update magic number, but mark as unmodified.
478@end table
479
480@findex executable-set-magic
481@vindex executable-query
482 The variable @code{executable-query} controls whether to ask about
483inserting or updating the magic number. When this is @code{nil} updating
484is only done with @kbd{M-x executable-set-magic}. When this is
485@code{'function} you are queried whenever @code{executable-set-magic} is
486called as a function, such as when Emacs puts a buffer in Shell script
487mode. Otherwise you are alway queried.
488
489@findex executable-self-display
490 @kbd{M-x executable-self-display} adds a magic number to the buffer, which
491will turn it into a self displaying text file, when called as a Un*x command.
492The ``interpreter'' used is @code{executable-self-display} with argument
493@code{+2}.
af372af6
DL
494
495@node Timestamps
496@chapter Maintaining Timestamps in Modified Files
497@cindex timestamps
498
499@findex time-stamp
500@vindex write-file-hooks
501The @code{time-stamp} command can be used to update automatically a
502template in a file with a new time stamp every time you save the file.
503Customize the hook @code{write-file-hooks} to add the function
504@code{time-stamp} to arrange this.
505
506@vindex time-stamp-active
507@vindex time-stamp-format
508@vindex time-stamp-start
509The time stamp is updated only if the customizable variable
510@code{time-stamp-active} is on, which it is by default; the command
511@code{time-stamp-toggle-active} can be used to toggle it. The format of
512the time stamp is set by the customizable variable
513@code{time-stamp-format}.
514
515@vindex time-stamp-line-limit
516@vindex time-stamp-end
517@vindex time-stamp-count
518@vindex time-stamp-inserts-lines
519The variables @code{time-stamp-line-limit}, @code{time-stamp-start},
520@code{time-stamp-end}, @code{time-stamp-count}, and
521@code{time-stamp-inserts-lines} control finding the template. Do not
522change these in your init file or you will be incompatible with other
523people's files. If you must change them, do so only in the local
524variables section of the file itself.
525
526Normally the template must appear in the first 8 lines of a file and
527look like one of the following:
528
529@example
530Time-stamp: <>
531Time-stamp: " "
532@end example
533
534The time stamp is written between the brackets or quotes:
535
536@example
537Time-stamp: <1998-02-18 10:20:51 gildea>
538@end example
539
540@node QuickURL
541@chapter QuickURL: Inserting URLs Based on Text at Point
542
543@vindex quickurl-url-file
544@findex quickurl
545@cindex URLs
546@kbd{M-x quickurl} can be used to insert a URL into a buffer based on
547the text at point. The URLs are stored in an external file defined by
548the variable @code{quickurl-url-file} as a list of either cons cells of
549the form @code{(@var{key} . @var{URL})} or
550lists of the form @code{(@var{key} @var{URL} @var{comment})}. These
551specify that @kbd{M-x quickurl} should insert @var{URL} if the word
552@var{key} is at point, for example:
553
554@example
555(("FSF" "http://www.fsf.org/" "The Free Software Foundation")
556 ("emacs" . "http://www.emacs.org/")
557 ("hagbard" "http://www.hagbard.demon.co.uk" "Hagbard's World"))
558@end example
559
560@findex quickurl-add-url
561@findex quickurl-list
562@kbd{M-x quickurl-add-url} can be used to add a new @var{key}/@var{URL}
563pair. @kbd{M-x quickurl-list} provides interactive editing of the URL
564list.
565
566@node Tempo
567@chapter Tempo: Flexible Template Insertion
568
569@cindex templates
570The Tempo package provides a simple way to define powerful templates, or
571macros, if you wish. It is mainly intended for, but not limited to,
572other programmers to be used for creating shortcuts for editing
573certain kinds of documents.
574
575@findex tempo-backward-mark
576@findex tempo-forward-mark
577A template is defined as a list of items to be inserted in the current
578buffer at point. Some can be simple strings, while others can control
579formatting or define special points of interest in the inserted text.
580@kbd{M-x tempo-backward-mark} and @kbd{M-x tempo-forward-mark} can be
581used to jump between such points.
582
583More flexible templates can be created by including lisp symbols, which
584will be evaluated as variables, or lists, which will will be evaluated
585as lisp expressions. Automatic completion of specified tags to expanded
586templates can be provided.
587
588@findex tempo-define-template
589See the documentation for @code{tempo-define-template} for the different
590items that can be used to define a tempo template with a command for
591inserting it.
592
593See the commentary in @file{tempo.el} for more information on using the
594Tempo package.
595
596@node Hippie Expand
597@chapter `Hippie' Expansion
598
599@findex hippie-expand
600@kindex M-/
601@vindex hippie-expand-try-functions-list
602@kbd{M-x hippie-expand} is a single command providing a variety of
603completions and expansions. Called repeatedly, it tries all possible
604completions in succession.
605
606Which ones to try, and in which order, is determined by the contents of
607the customizable option @code{hippie-expand-try-functions-list}. Much
608customization of the expansion behaviour can be made by changing the
609order of, removing, or inserting new functions in this list. Given a
610positive numeric argument, @kbd{M-x hippie-expand} jumps directly that
611number of functions forward in this list. Given some other argument (a
612negative argument or just @kbd{C-u}) it undoes the tried completion.
613
614See the commentary in @file{hippie-exp.el} for more information on the
615possibilities.
616
617Typically you would bind @code{hippie-expand} to @kbd{M-/} with
618@code{dabbrev-expand}, the standard binding of @kbd{M-/}, providing one
619of the expansion possibilities.
620
621
622@node Concept Index
623@unnumbered Concept Index
624@printindex cp
625
626@node Command Index
627@unnumbered Command Index
628@printindex fn
629
630@node Variable Index
631@unnumbered Variable Index
632@printindex vr
633
634@contents
635@bye