changeset 56097:b5382c383798

(Copyrights, Timestamps): Recommend `before-save-hook' instead of `write-file-functions'.
author Luc Teirlinck <teirllm@auburn.edu>
date Sun, 13 Jun 2004 23:06:37 +0000
parents b3afb91fddfe
children 82b26077acce
files man/autotype.texi
diffstat 1 files changed, 12 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/man/autotype.texi	Sun Jun 13 22:57:46 2004 +0000
+++ b/man/autotype.texi	Sun Jun 13 23:06:37 2004 +0000
@@ -456,16 +456,19 @@
 that is updated too.
 
   An interesting application for this function is to have it be called
-automatically every time a file is saved.  This is accomplished by putting
-@code{(add-hook 'write-file-functions 'copyright-update)} into your @file{~/.emacs}
-file (@pxref{(emacs)Init File}).
+automatically every time a file is saved.  This is accomplished by
+putting @code{(add-hook 'before-save-hook 'copyright-update)} into
+your @file{~/.emacs} file (@pxref{(emacs)Init File}).  Alternative,
+you can do @kbd{M-x customize-variable @key{RET} before-save-hook
+@key{RET}}.  @code{copyright-update} is conveniently listed as an
+option in the customization buffer.
 
 @vindex copyright-query
   The variable @code{copyright-query} controls whether to update the
 copyright or whether to ask about it.  When this is @code{nil} updating is
 only done with @kbd{M-x copyright-update}.  When this is @code{function}
 you are queried whenever @code{copyright-update} is called as a function,
-such as in the @code{write-file-functions} feature mentioned above.  Otherwise
+such as in the @code{before-save-hook} feature mentioned above.  Otherwise
 you are always queried.
 
 
@@ -522,11 +525,13 @@
 @cindex timestamps
 
 @findex time-stamp
-@vindex write-file-functions
+@vindex before-save-hook
 The @code{time-stamp} command can be used to update automatically a
 template in a file with a new time stamp every time you save the file.
-Customize the hook @code{write-file-functions} to add the function
-@code{time-stamp} to arrange this.
+Customize the hook @code{before-save-hook} to add the function
+@code{time-stamp} to arrange this.  It you use Custom to do this,
+then @code{time-stamp} is conveniently listed as an option in the
+customization buffer.
 
 @vindex time-stamp-active
 @vindex time-stamp-format