diff options
author | Luc Teirlinck <teirllm@auburn.edu> | 2004-06-13 21:23:24 +0000 |
---|---|---|
committer | Luc Teirlinck <teirllm@auburn.edu> | 2004-06-13 21:23:24 +0000 |
commit | 66c6d25eeae930e3f95d955c81bb5f78eeacb906 (patch) | |
tree | 353955135c48e839585523e6442fd0be441c44f0 /lisp/time-stamp.el | |
parent | 2f9edc8be5e26b08bfbe1fe8569ad110cbf21892 (diff) | |
download | emacs-66c6d25eeae930e3f95d955c81bb5f78eeacb906.tar.gz |
(time-stamp): Recommend adding it to `before-save-hook', rather than
`write-file-functions'.
Make a similar change in `Commentary' section.
Diffstat (limited to 'lisp/time-stamp.el')
-rw-r--r-- | lisp/time-stamp.el | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lisp/time-stamp.el b/lisp/time-stamp.el index b6e76ee5394..42231916f95 100644 --- a/lisp/time-stamp.el +++ b/lisp/time-stamp.el @@ -5,7 +5,7 @@ ;; This file is part of GNU Emacs. -;; Maintainer's Time-stamp: <2003-02-01 09:26:25 gildea> +;; Maintainer's Time-stamp: <2004-06-13 14:22:25 teirllm> ;; Maintainer: Stephen Gildea <gildea@stop.mail-abuse.org> ;; Keywords: tools @@ -32,7 +32,7 @@ ;; See the top of `time-stamp.el' for another example. ;; To use time-stamping, add this line to your .emacs file: -;; (add-hook 'write-file-hooks 'time-stamp) +;; (add-hook 'before-save-hook 'time-stamp) ;; Now any time-stamp templates in your files will be updated automatically. ;; See the documentation for the functions `time-stamp' @@ -242,7 +242,7 @@ of the time-stamped file itself.") "Update the time stamp string(s) in the buffer. A template in a file can be automatically updated with a new time stamp every time you save the file. Add this line to your .emacs file: - (add-hook 'write-file-hooks 'time-stamp) + (add-hook 'before-save-hook 'time-stamp) Normally the template must appear in the first 8 lines of a file and look like one of the following: Time-stamp: <> @@ -318,7 +318,6 @@ template." (setq start (time-stamp-once start search-limit ts-start ts-end ts-format format-lines end-lines)) (setq ts-count (1- ts-count)))) - ;; be sure to return nil so can be used on write-file-hooks nil) (defun time-stamp-once (start search-limit ts-start ts-end |