/[emacs]/emacs/lisp/time-stamp.el
ViewVC logotype

Diff of /emacs/lisp/time-stamp.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.54 by miles, Mon Sep 1 15:45:17 2003 UTC revision 1.55 by teirllm, Sun Jun 13 21:23:24 2004 UTC
# Line 5  Line 5 
5    
6  ;; This file is part of GNU Emacs.  ;; This file is part of GNU Emacs.
7    
8  ;; Maintainer's Time-stamp: <2003-02-01 09:26:25 gildea>  ;; Maintainer's Time-stamp: <2004-06-13 14:22:25 teirllm>
9  ;; Maintainer: Stephen Gildea <gildea@stop.mail-abuse.org>  ;; Maintainer: Stephen Gildea <gildea@stop.mail-abuse.org>
10  ;; Keywords: tools  ;; Keywords: tools
11    
# Line 32  Line 32 
32  ;; See the top of `time-stamp.el' for another example.  ;; See the top of `time-stamp.el' for another example.
33    
34  ;; To use time-stamping, add this line to your .emacs file:  ;; To use time-stamping, add this line to your .emacs file:
35  ;;     (add-hook 'write-file-hooks 'time-stamp)  ;;     (add-hook 'before-save-hook 'time-stamp)
36  ;; Now any time-stamp templates in your files will be updated automatically.  ;; Now any time-stamp templates in your files will be updated automatically.
37    
38  ;; See the documentation for the functions `time-stamp'  ;; See the documentation for the functions `time-stamp'
# Line 242  of the time-stamped file itself.") Line 242  of the time-stamped file itself.")
242    "Update the time stamp string(s) in the buffer.    "Update the time stamp string(s) in the buffer.
243  A template in a file can be automatically updated with a new time stamp  A template in a file can be automatically updated with a new time stamp
244  every time you save the file.  Add this line to your .emacs file:  every time you save the file.  Add this line to your .emacs file:
245      (add-hook 'write-file-hooks 'time-stamp)      (add-hook 'before-save-hook 'time-stamp)
246  Normally the template must appear in the first 8 lines of a file and  Normally the template must appear in the first 8 lines of a file and
247  look like one of the following:  look like one of the following:
248        Time-stamp: <>        Time-stamp: <>
# Line 318  template." Line 318  template."
318        (setq start (time-stamp-once start search-limit ts-start ts-end        (setq start (time-stamp-once start search-limit ts-start ts-end
319                                     ts-format format-lines end-lines))                                     ts-format format-lines end-lines))
320        (setq ts-count (1- ts-count))))        (setq ts-count (1- ts-count))))
   ;; be sure to return nil so can be used on write-file-hooks  
321    nil)    nil)
322    
323  (defun time-stamp-once (start search-limit ts-start ts-end  (defun time-stamp-once (start search-limit ts-start ts-end

Legend:
Removed from v.1.54  
changed lines
  Added in v.1.55

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26