1 |
\input texinfo |
\input texinfo |
2 |
@c This is an annex of the Emacs manual. |
@c This is an annex of the Emacs manual. |
3 |
@c Copyright (C) 1994, 1995 Free Software Foundation, Inc. |
@c Copyright (C) 1994, 1995, 2002 Free Software Foundation, Inc. |
4 |
@c Author: Daniel.Pfeiffer@Informatik.START.dbp.de, fax (+49 69) 7588-2389 |
@c Author: Daniel.Pfeiffer@Informatik.START.dbp.de, fax (+49 69) 7588-2389 |
5 |
@setfilename ../info/autotype |
@setfilename ../info/autotype |
6 |
@c @node Autotypist, Picture, Abbrevs, Top |
@c @node Autotypist, Picture, Abbrevs, Top |
10 |
@c @cindex selfinserting text |
@c @cindex selfinserting text |
11 |
@c @cindex autotypist |
@c @cindex autotypist |
12 |
|
|
13 |
@dircategory Emacs |
@copying |
|
@direntry |
|
|
* Autotype: (autotype). Convenient features for text that you enter frequently |
|
|
in Emacs. |
|
|
@end direntry |
|
|
|
|
|
@ifnottex |
|
14 |
Copyright @copyright{} 1994, 1995, 1999 Free Software Foundation, Inc. |
Copyright @copyright{} 1994, 1995, 1999 Free Software Foundation, Inc. |
15 |
|
|
16 |
|
@quotation |
17 |
Permission is granted to copy, distribute and/or modify this document |
Permission is granted to copy, distribute and/or modify this document |
18 |
under the terms of the GNU Free Documentation License, Version 1.1 or |
under the terms of the GNU Free Documentation License, Version 1.1 or |
19 |
any later version published by the Free Software Foundation; with the |
any later version published by the Free Software Foundation; with the |
31 |
Documentation License. If you want to distribute this document |
Documentation License. If you want to distribute this document |
32 |
separately from the collection, you can do so by adding a copy of the |
separately from the collection, you can do so by adding a copy of the |
33 |
license to the document, as described in section 6 of the license. |
license to the document, as described in section 6 of the license. |
34 |
@end ifnottex |
@end quotation |
35 |
|
@end copying |
36 |
|
|
37 |
|
@dircategory Emacs |
38 |
|
@direntry |
39 |
|
* Autotype: (autotype). Convenient features for text that you enter frequently |
40 |
|
in Emacs. |
41 |
|
@end direntry |
42 |
|
|
43 |
@titlepage |
@titlepage |
44 |
@sp 10 |
@sp 10 |
53 |
|
|
54 |
@page |
@page |
55 |
@vskip 0pt plus 1filll |
@vskip 0pt plus 1filll |
56 |
Copyright @copyright{} 1994, 1995, 1999 Free Software Foundation, Inc. |
@insertcopying |
|
@sp 1 |
|
|
Permission is granted to copy, distribute and/or modify this document |
|
|
under the terms of the GNU Free Documentation License, Version 1.1 or |
|
|
any later version published by the Free Software Foundation; with the |
|
|
Invariant Sections being ``The GNU Manifesto'', ``Distribution'' and |
|
|
``GNU GENERAL PUBLIC LICENSE'', with the Front-Cover texts being ``A GNU |
|
|
Manual'', and with the Back-Cover Texts as in (a) below. A copy of the |
|
|
license is included in the section entitled ``GNU Free Documentation |
|
|
License'' in the Emacs manual. |
|
|
|
|
|
(a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify |
|
|
this GNU Manual, like GNU software. Copies published by the Free |
|
|
Software Foundation raise funds for GNU development.'' |
|
|
|
|
|
This document is part of a collection distributed under the GNU Free |
|
|
Documentation License. If you want to distribute this document |
|
|
separately from the collection, you can do so by adding a copy of the |
|
|
license to the document, as described in section 6 of the license. |
|
57 |
@end titlepage |
@end titlepage |
58 |
|
|
59 |
@node Top |
@node Top |
355 |
the buffer. The main application for this function, as its name suggests, |
the buffer. The main application for this function, as its name suggests, |
356 |
is to have it be called automatically every time an empty, and only an |
is to have it be called automatically every time an empty, and only an |
357 |
empty file is visited. This is accomplished by putting @code{(add-hook |
empty file is visited. This is accomplished by putting @code{(add-hook |
358 |
'find-file-hooks 'auto-insert)} into your @file{~/.emacs} file |
'find-file-hook 'auto-insert)} into your @file{~/.emacs} file |
359 |
(@pxref{(emacs)Init File}). |
(@pxref{(emacs)Init File}). |
360 |
|
|
361 |
@vindex auto-insert-alist |
@vindex auto-insert-alist |
393 |
source files insert the usual header, with a copyright of your |
source files insert the usual header, with a copyright of your |
394 |
environment variable @env{$ORGANIZATION} or else the FSF, and prompt |
environment variable @env{$ORGANIZATION} or else the FSF, and prompt |
395 |
for valid keywords describing the contents. Files in a @file{bin} |
for valid keywords describing the contents. Files in a @file{bin} |
396 |
directory for which Emacs could determine no specialised mode |
directory for which Emacs could determine no specialized mode |
397 |
(@pxref{(emacs)Choosing Modes}) are set to Shell script mode. |
(@pxref{(emacs)Choosing Modes}) are set to Shell script mode. |
398 |
|
|
399 |
@findex define-auto-insert |
@findex define-auto-insert |
457 |
|
|
458 |
An interesting application for this function is to have it be called |
An interesting application for this function is to have it be called |
459 |
automatically every time a file is saved. This is accomplished by putting |
automatically every time a file is saved. This is accomplished by putting |
460 |
@code{(add-hook 'write-file-hooks 'copyright-update)} into your @file{~/.emacs} |
@code{(add-hook 'write-file-functions 'copyright-update)} into your @file{~/.emacs} |
461 |
file (@pxref{(emacs)Init File}). |
file (@pxref{(emacs)Init File}). |
462 |
|
|
463 |
@vindex copyright-query |
@vindex copyright-query |
465 |
copyright or whether to ask about it. When this is @code{nil} updating is |
copyright or whether to ask about it. When this is @code{nil} updating is |
466 |
only done with @kbd{M-x copyright-update}. When this is @code{function} |
only done with @kbd{M-x copyright-update}. When this is @code{function} |
467 |
you are queried whenever @code{copyright-update} is called as a function, |
you are queried whenever @code{copyright-update} is called as a function, |
468 |
such as in the @code{write-file-hooks} feature mentioned above. Otherwise |
such as in the @code{write-file-functions} feature mentioned above. Otherwise |
469 |
you are always queried. |
you are always queried. |
470 |
|
|
471 |
|
|
522 |
@cindex timestamps |
@cindex timestamps |
523 |
|
|
524 |
@findex time-stamp |
@findex time-stamp |
525 |
@vindex write-file-hooks |
@vindex write-file-functions |
526 |
The @code{time-stamp} command can be used to update automatically a |
The @code{time-stamp} command can be used to update automatically a |
527 |
template in a file with a new time stamp every time you save the file. |
template in a file with a new time stamp every time you save the file. |
528 |
Customize the hook @code{write-file-hooks} to add the function |
Customize the hook @code{write-file-functions} to add the function |
529 |
@code{time-stamp} to arrange this. |
@code{time-stamp} to arrange this. |
530 |
|
|
531 |
@vindex time-stamp-active |
@vindex time-stamp-active |