aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Love1999-10-23 18:18:03 +0000
committerDave Love1999-10-23 18:18:03 +0000
commitaf372af632bb21749e858350200e13b3e9c10057 (patch)
tree3c497c15c65802c9657ebc6c7833c50685620ca2
parent6bfff0646b32006bed96d41bba6de0596263d93d (diff)
downloademacs-af372af632bb21749e858350200e13b3e9c10057.tar.gz
emacs-af372af632bb21749e858350200e13b3e9c10057.zip
*** empty log message ***
-rw-r--r--lisp/ChangeLog4
-rw-r--r--lisp/elide-head.el116
-rw-r--r--man/ChangeLog6
-rw-r--r--man/autotype.texi277
4 files changed, 358 insertions, 45 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 8402bea63d2..4880d20a68a 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,7 @@
11999-10-23 Dave Love <fx@gnu.org>
2
3 * elide-head.el: New file.
4
11999-10-23 Gerd Moellmann <gerd@gnu.org> 51999-10-23 Gerd Moellmann <gerd@gnu.org>
2 6
3 * Makefile (compile-files, backup-compiled-files): New targets. 7 * Makefile (compile-files, backup-compiled-files): New targets.
diff --git a/lisp/elide-head.el b/lisp/elide-head.el
new file mode 100644
index 00000000000..db26eb8f9ea
--- /dev/null
+++ b/lisp/elide-head.el
@@ -0,0 +1,116 @@
1;;; elid-head.el --- hide headers in files
2
3;; Copyright (C) 1999 Free Software Foundation, Inc.
4
5;; Author: Dave Love <fx@gnu.org>
6;; Keywords: outlines tools
7
8;; This file is part of GNU Emacs.
9
10;; GNU Emacs is free software; you can redistribute it and/or modify
11;; it under the terms of the GNU General Public License as published by
12;; the Free Software Foundation; either version 2, or (at your option)
13;; any later version.
14
15;; GNU Emacs is distributed in the hope that it will be useful,
16;; but WITHOUT ANY WARRANTY; without even the implied warranty of
17;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18;; GNU General Public License for more details.
19
20;; You should have received a copy of the GNU General Public License
21;; along with GNU Emacs; see the file COPYING. If not, write to the
22;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
23;; Boston, MA 02111-1307, USA.
24
25;;; Commentary:
26
27;; Functionality for eliding boilerplate text (normally copyright
28;; notices) in file headers to avoid clutter when you know what it
29;; says.
30;;
31;; `elide-head-headers-to-hide' controls what is elided by the command
32;; `elide-head'. A buffer-local invisible overlay manages the
33;; elision.
34
35;; Please don't turn this on in site init files so that information
36;; isn't hidden from users who may not know what it says.
37
38;; Inspired by jwz's hide-copyleft.el, for which we don't have an
39;; assignment.
40
41;;; Code:
42
43(defgroup elide-head nil
44 "Eliding copyright headers and the like in source files."
45 :prefix "elide-head"
46 :group 'tools)
47
48(defcustom elide-head-headers-to-hide
49 '(("is free software; you can redistribute it" . ; GNU boilerplate
50 "Boston, MA 02111-1307, USA\\.")
51 ("The Regents of the University of California\\. All rights reserved\\." .
52 "SUCH DAMAGE\\.") ; BSD
53 ("Permission is hereby granted, free of charge" . ; X11
54 "authorization from the X Consortium\\."))
55 "Alist of regexps defining start end end of text to elide.
56
57The cars of elements of the list are searched for in order. Text is
58elided with an invisible overlay from the end of the line where the
59first match is found to the end of the match for the corresponding
60cdr."
61 :group 'elide-head
62 :type '(alist :key-type (string :tag "Start regexp")
63 :value-type (string :tag "End regexp")))
64
65(defvar elide-head-overlay nil)
66(make-variable-buffer-local 'elide-head-overlay)
67
68;;;###autoload
69(defun elide-head (&optional arg)
70 "Hide header material in buffer according to `elide-head-headers-to-hide'.
71
72The header is made invisible with an overlay. With a prefix arg, show
73an elided material again.
74
75This is suitable as an entry on `find-file-hooks' or appropriate mode hooks."
76 (interactive "P")
77 (if arg
78 (elide-head-show)
79 (save-excursion
80 (save-restriction
81 (let ((rest elide-head-headers-to-hide)
82 beg end)
83 (widen)
84 (goto-char (point-min))
85 (while rest
86 (save-excursion
87 (when (re-search-forward (caar rest) nil t)
88 (setq beg (point))
89 (when (re-search-forward (cdar rest) nil t)
90 (setq end (point)
91 rest nil))))
92 (if rest (setq rest (cdr rest))))
93 (if (not (and beg end))
94 (if (interactive-p)
95 (error "No header found"))
96 (goto-char beg)
97 (end-of-line)
98 (if (overlayp elide-head-overlay)
99 (move-overlay elide-head-overlay (point) end)
100 (setq elide-head-overlay (make-overlay (point) end)))
101 (overlay-put elide-head-overlay 'invisible t)
102 (overlay-put elide-head-overlay 'intangible t)
103 (overlay-put elide-head-overlay 'after-string "...")))))))
104
105(defun elide-head-show ()
106 "Show a header elided current buffer by \\[elide-head]."
107 (interactive)
108 (if (and (overlayp elide-head-overlay)
109 (overlay-buffer elide-head-overlay))
110 (delete-overlay elide-head-overlay)
111 (if (interactive-p)
112 (error "No header hidden"))))
113
114(provide 'elide-head)
115
116;;; elide-head.el ends here
diff --git a/man/ChangeLog b/man/ChangeLog
index 82c431dcc5e..3d1013785e3 100644
--- a/man/ChangeLog
+++ b/man/ChangeLog
@@ -1,3 +1,9 @@
11999-10-23 Dave Love <fx@gnu.org>
2
3 * autotype.texi: New file.
4
5 * Makefile.in: Use it.
6
11999-10-23 Paul Eggert <eggert@twinsun.com> 71999-10-23 Paul Eggert <eggert@twinsun.com>
2 8
3 * mule.texi, cmdargs.texi: 9 * mule.texi, cmdargs.texi:
diff --git a/man/autotype.texi b/man/autotype.texi
index 4a6574dc547..ad1bfd9a9f1 100644
--- a/man/autotype.texi
+++ b/man/autotype.texi
@@ -1,12 +1,15 @@
1@c This is part of the Emacs manual. 1\input texinfo
2@c This is an annex of the Emacs manual.
2@c Copyright (C) 1994, 1995 Free Software Foundation, Inc. 3@c Copyright (C) 1994, 1995 Free Software Foundation, Inc.
3@c Author: Daniel.Pfeiffer@Informatik.START.dbp.de, fax (+49 69) 7588-2389 4@c Author: Daniel.Pfeiffer@Informatik.START.dbp.de, fax (+49 69) 7588-2389
4@c See file emacs.texi for copying conditions. 5@c See file emacs.texi for copying conditions.
5@node Autotypist, Picture, Abbrevs, Top 6@setfilename ../info/autotype
6@chapter Features for Automatic Typing 7@c @node Autotypist, Picture, Abbrevs, Top
7@cindex text 8@c @chapter Features for Automatic Typing
8@cindex selfinserting text 9@settitle Features for Automatic Typing
9@cindex autotypist 10@c @cindex text
11@c @cindex selfinserting text
12@c @cindex autotypist
10 13
11@dircategory Editors 14@dircategory Editors
12@direntry 15@direntry
@@ -14,11 +17,36 @@
14 in Emacs. 17 in Emacs.
15@end direntry 18@end direntry
16 19
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
17 Under certain circumstances you will find yourself typing similar things 44 Under certain circumstances you will find yourself typing similar things
18over and over again. This is especially true of form letters and programming 45over and over again. This is especially true of form letters and programming
19language constructs. Project-specific header comments, flow-control 46language constructs. Project-specific header comments, flow-control
20constructs or magic numbers are essentially the same every time. Emacs has 47constructs or magic numbers are essentially the same every time. Emacs has
21various features for doing tedious and repetitive typing chores for you. 48various features for doing tedious and repetitive typing chores for you
49in addition to the Abbrev features (@pxref{(emacs)Abbrevs}).
22 50
23 One solution is using skeletons, flexible rules that say what to 51 One solution is using skeletons, flexible rules that say what to
24insert, and how to do it. Various programming language modes offer some 52insert, and how to do it. Various programming language modes offer some
@@ -30,23 +58,38 @@ depending on the file-name or the mode as appropriate. You can have a file or
30a skeleton inserted, or you can call a function. Then there is the 58a skeleton inserted, or you can call a function. Then there is the
31possibility to have Un*x interpreter scripts automatically take on a magic 59possibility to have Un*x interpreter scripts automatically take on a magic
32number and be executable as soon as they are saved. Or you can have a 60number and be executable as soon as they are saved. Or you can have a
33copyright notice's year updated, if necessary, every time you save a file. 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.
34 68
35@menu 69@menu
36* Using Skeletons:: How to insert a skeleton into your text. 70* Using Skeletons:: How to insert a skeleton into your text.
37* Wrapping Skeletons:: Putting existing text within a skeleton. 71* Wrapping Skeletons:: Putting existing text within a skeleton.
38* Skeletons as Abbrevs:: An alternative for issuing skeleton commands. 72* Skeletons as Abbrevs:: An alternative for issuing skeleton commands.
39* Skeleton Language:: Making skeleton commands insert what you want. 73* Skeleton Language:: Making skeleton commands insert what you want.
40* Inserting Pairs:: Typing one character and getting another after point. 74* Inserting Pairs:: Typing one character and getting another
75 after point.
41* Autoinserting:: Filling up empty files as soon as you visit them. 76* Autoinserting:: Filling up empty files as soon as you visit them.
42* Copyrights:: Inserting and updating copyrights. 77* Copyrights:: Inserting and updating copyrights.
43* Executables:: Turning interpreter scripts into executables. 78* Executables:: Turning interpreter scripts into executables.
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::
44@end menu 87@end menu
45 88
46 89
47 90
48@node Using Skeletons 91@node Using Skeletons
49@section Using Skeletons 92@chapter Using Skeletons
50@cindex skeletons 93@cindex skeletons
51@cindex using skeletons 94@cindex using skeletons
52 95
@@ -54,9 +97,10 @@ copyright notice's year updated, if necessary, every time you save a file.
54programming language you are using, skeletons are a means of accomplishing 97programming language you are using, skeletons are a means of accomplishing
55this. Normally skeletons each have a command of their own, that, when called, 98this. Normally skeletons each have a command of their own, that, when called,
56will insert the skeleton. These commands can be issued in the usual ways 99will insert the skeleton. These commands can be issued in the usual ways
57(@xref{Commands}). Modes that offer various skeletons will often bind these 100(@xref{(emacs)Commands}). Modes that offer various skeletons will often
58to key-sequences on the @kbd{C-c} prefix, as well as having an @cite{Insert} 101bind these to key-sequences on the @kbd{C-c} prefix, as well as having
59menu and maybe even predefined abbrevs for them (@xref{Skeletons as Abbrevs}). 102an @cite{Insert} menu and maybe even predefined abbrevs for them
103(@xref{Skeletons as Abbrevs}).
60 104
61 The simplest kind of skeleton will simply insert some text indented 105 The simplest kind of skeleton will simply insert some text indented
62according to the major mode and leave the cursor at a likely place in the 106according to the major mode and leave the cursor at a likely place in the
@@ -75,7 +119,7 @@ termination still gets inserted.
75 119
76 120
77@node Wrapping Skeletons 121@node Wrapping Skeletons
78@section Wrapping Skeletons Around Existing Test 122@chapter Wrapping Skeletons Around Existing Text
79@cindex wrapping skeletons 123@cindex wrapping skeletons
80 124
81 Often you will find yourself with some code that for whatever reason 125 Often you will find yourself with some code that for whatever reason
@@ -85,18 +129,18 @@ accomplishing this, and can even, in the case of programming languages,
85reindent the wrapped code for you. 129reindent the wrapped code for you.
86 130
87 Skeleton commands take an optional numeric prefix argument 131 Skeleton commands take an optional numeric prefix argument
88(@xref{Arguments}). This is interpreted in two different ways depending 132(@xref{(emacs)Arguments}). This is interpreted in two different ways depending
89on whether the prefix is positive, i.e. forwards oriented or negative, 133on whether the prefix is positive, i.e. forwards oriented or negative,
90i.e. backwards oriented. 134i.e. backwards oriented.
91 135
92 A positive prefix means to wrap the skeleton around that many following 136 A positive prefix means to wrap the skeleton around that many
93words. This is accomplished by putting the words there where the point is 137following words. This is accomplished by putting the words there where
94normally left after that skeleton is inserted (@xref{Using Skeletons}). The 138the point is normally left after that skeleton is inserted (@xref{Using
95point (@xref{Point}) is left at the next interesting spot in the skeleton 139Skeletons}). The point (@xref{(emacs)Point}) is left at the next
96instead. 140interesting spot in the skeleton instead.
97 141
98 A negative prefix means to do something similar with that many precedingly 142 A negative prefix means to do something similar with that many precedingly
99marked interregions (@xref{Mark}). In the simplest case, if you type 143marked interregions (@xref{(emacs)Mark}). In the simplest case, if you type
100@kbd{M--} just before issuing the skeleton command, that will wrap the 144@kbd{M--} just before issuing the skeleton command, that will wrap the
101skeleton around the current region, just like a positive argument would have 145skeleton around the current region, just like a positive argument would have
102wrapped it around a number of words. 146wrapped it around a number of words.
@@ -124,12 +168,12 @@ tried to follow the order in which you marked these points.
124 168
125 169
126@node Skeletons as Abbrevs 170@node Skeletons as Abbrevs
127@section Skeletons as Abbrev Expansions 171@chapter Skeletons as Abbrev Expansions
128@cindex skeletons as abbrevs 172@cindex skeletons as abbrevs
129 173
130 Rather than use a keybinding for every skeleton command, you can also define 174 Rather than use a keybinding for every skeleton command, you can also
131an abbreviation (@xref{Defining Abbrevs}) that will expand (@xref{Expanding 175define an abbreviation (@xref{(emacs)Defining Abbrevs}) that will expand
132Abbrevs}) into the skeleton. 176(@xref{(emacs)Expanding Abbrevs}) into the skeleton.
133 177
134 Say you want @samp{ifst} to be an abbreviation for the C language if 178 Say you want @samp{ifst} to be an abbreviation for the C language if
135statement. You will tell Emacs that @samp{ifst} expands to the empty string 179statement. You will tell Emacs that @samp{ifst} expands to the empty string
@@ -149,7 +193,7 @@ have been omitted.)
149 193
150 194
151@node Skeleton Language 195@node Skeleton Language
152@section Skeleton Language 196@chapter Skeleton Language
153@cindex skeleton language 197@cindex skeleton language
154 198
155@findex skeleton-insert 199@findex skeleton-insert
@@ -228,12 +272,12 @@ skeleton. The first argument is the command name, the second is a
228documentation string, and the rest is an interactor and any number of skeleton 272documentation string, and the rest is an interactor and any number of skeleton
229elements together forming a skeleton. This skeleton is assigned to a variable 273elements together forming a skeleton. This skeleton is assigned to a variable
230of the same name as the command and can thus be overridden from your 274of the same name as the command and can thus be overridden from your
231@file{~/.emacs} file (@xref{Init File}). 275@file{~/.emacs} file (@xref{(emacs)Init File}).
232 276
233 277
234 278
235@node Inserting Pairs 279@node Inserting Pairs
236@section Inserting Matching Pairs of Characters 280@chapter Inserting Matching Pairs of Characters
237@cindex inserting pairs 281@cindex inserting pairs
238@cindex pairs 282@cindex pairs
239 283
@@ -247,12 +291,13 @@ fingers backwards, this can be quite relieving too.
247 291
248@findex pair-insert-maybe 292@findex pair-insert-maybe
249@vindex pair 293@vindex pair
250 This is done by binding the first key (@xref{Rebinding}) of the pair to 294 This is done by binding the first key (@xref{(emacs)Rebinding}) of the
251@code{pair-insert-maybe} instead of @code{self-insert-command}. The maybe 295pair to @code{pair-insert-maybe} instead of @code{self-insert-command}.
252comes from the fact that this at first surprising behaviour is initially 296The maybe comes from the fact that this at first surprising behaviour is
253turned off. To enable it, you must set @code{pair} to some non-@code{nil} 297initially turned off. To enable it, you must set @code{pair} to some
254value. And even then, a positive argument (@xref{Arguments}) will make this 298non-@code{nil} value. And even then, a positive argument
255key behave like a self inserting key (@xref{Inserting Text}). 299(@xref{(emacs)Arguments}) will make this key behave like a self
300inserting key (@xref{(emacs)Inserting Text}).
256 301
257@findex pair-on-word 302@findex pair-on-word
258 While this breaks with the stated intention of always balancing pairs, it 303 While this breaks with the stated intention of always balancing pairs, it
@@ -279,7 +324,7 @@ in certain contexts. For example an escaped character will stand for itself.
279 324
280 325
281@node Autoinserting 326@node Autoinserting
282@section Autoinserting Text in Empty Files 327@chapter Autoinserting Text in Empty Files
283@cindex autoinserting 328@cindex autoinserting
284 329
285@findex auto-insert 330@findex auto-insert
@@ -287,8 +332,8 @@ in certain contexts. For example an escaped character will stand for itself.
287the buffer. The main application for this function, as its name suggests, 332the buffer. The main application for this function, as its name suggests,
288is to have it be called automatically every time an empty, and only an 333is to have it be called automatically every time an empty, and only an
289empty file is visited. This is accomplished by putting @code{(add-hook 334empty file is visited. This is accomplished by putting @code{(add-hook
290'find-file-hooks 'auto-insert)} into your @file{~/.emacs} file (@xref{Init 335'find-file-hooks 'auto-insert)} into your @file{~/.emacs} file
291File}). 336(@xref{(emacs)Init File}).
292 337
293@vindex auto-insert-alist 338@vindex auto-insert-alist
294 What gets inserted, if anything, is determined by the variable 339 What gets inserted, if anything, is determined by the variable
@@ -324,11 +369,11 @@ files insert a skeleton with the usual frame.
324files insert the usual header, with a copyright of your environment variable 369files insert the usual header, with a copyright of your environment variable
325@code{$ORGANIZATION} or else the FSF, and prompt for valid keywords describing 370@code{$ORGANIZATION} or else the FSF, and prompt for valid keywords describing
326the contents. Files in a @code{bin/} directory for which Emacs could 371the contents. Files in a @code{bin/} directory for which Emacs could
327determine no specialised mode (@xref{Choosing Modes}) are set to Shell script 372determine no specialised mode (@xref{(emacs)Choosing Modes}) are set to Shell script
328mode. 373mode.
329 374
330@findex define-auto-insert 375@findex define-auto-insert
331 In Lisp (@xref{Init File}) you can use the function @code{define-auto-insert} 376 In Lisp (@xref{(emacs)Init File}) you can use the function @code{define-auto-insert}
332to add to or modify @code{auto-insert-alist}. See its documentation with 377to add to or modify @code{auto-insert-alist}. See its documentation with
333@kbd{C-h f auto-insert-alist}. 378@kbd{C-h f auto-insert-alist}.
334 379
@@ -363,14 +408,14 @@ expression that matched the filename.
363 408
364 409
365@node Copyrights 410@node Copyrights
366@section Inserting and Updating Copyrights 411@chapter Inserting and Updating Copyrights
367@cindex copyrights 412@cindex copyrights
368 413
369@findex copyright 414@findex copyright
370 @kbd{M-x copyright} is a skeleton inserting command, that adds a copyright 415 @kbd{M-x copyright} is a skeleton inserting command, that adds a copyright
371notice at the point. The ``by'' part is taken from your environment variable 416notice at the point. The ``by'' part is taken from your environment variable
372@code{$ORGANIZATION} or if that isn't set you are prompted for it. If the 417@code{$ORGANIZATION} or if that isn't set you are prompted for it. If the
373buffer has a comment syntax (@xref{Comments}), this is inserted as a comment. 418buffer has a comment syntax (@xref{(emacs)Comments}), this is inserted as a comment.
374 419
375@findex copyright-update 420@findex copyright-update
376@vindex copyright-limit 421@vindex copyright-limit
@@ -382,13 +427,13 @@ existing ones, in the same format as the preceding year, i.e. 1994, '94 or 94.
382If a dash-separated year list up to last year is found, that is extended to 427If a dash-separated year list up to last year is found, that is extended to
383current year, else the year is added separated by a comma. Or it replaces 428current year, else the year is added separated by a comma. Or it replaces
384them when this is called with a prefix argument. If a header referring to a 429them when this is called with a prefix argument. If a header referring to a
385wrong version of the GNU General Public License (@xref{Copying}) is found, 430wrong version of the GNU General Public License (@xref{(emacs)Copying}) is found,
386that is updated too. 431that is updated too.
387 432
388 An interesting application for this function is to have it be called 433 An interesting application for this function is to have it be called
389automatically every time a file is saved. This is accomplished by putting 434automatically every time a file is saved. This is accomplished by putting
390@code{(add-hook 'write-file-hooks 'copyright-update)} into your @file{~/.emacs} 435@code{(add-hook 'write-file-hooks 'copyright-update)} into your @file{~/.emacs}
391file (@xref{Init File}). 436file (@xref{(emacs)Init File}).
392 437
393@vindex copyright-query 438@vindex copyright-query
394 The variable @code{copyright-query} controls whether to update the 439 The variable @code{copyright-query} controls whether to update the
@@ -401,7 +446,7 @@ you are always queried.
401 446
402 447
403@node Executables 448@node Executables
404@section Making Interpreter Scripts Executable 449@chapter Making Interpreter Scripts Executable
405@cindex executables 450@cindex executables
406 451
407@vindex executable-prefix 452@vindex executable-prefix
@@ -415,7 +460,7 @@ system @code{chmod} command. The magic number is prefixed by the value of
415@code{executable-prefix}. 460@code{executable-prefix}.
416 461
417@vindex executable-magicless-file-regexp 462@vindex executable-magicless-file-regexp
418 Any file whos name matches @code{executable-magicless-file-regexp} is not 463 Any file whose name matches @code{executable-magicless-file-regexp} is not
419furnished with a magic number, nor is it made executable. This is mainly 464furnished with a magic number, nor is it made executable. This is mainly
420intended for resource files, which are only meant to be read in. 465intended for resource files, which are only meant to be read in.
421 466
@@ -446,3 +491,145 @@ mode. Otherwise you are alway queried.
446will turn it into a self displaying text file, when called as a Un*x command. 491will turn it into a self displaying text file, when called as a Un*x command.
447The ``interpreter'' used is @code{executable-self-display} with argument 492The ``interpreter'' used is @code{executable-self-display} with argument
448@code{+2}. 493@code{+2}.
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