File: time-stamp.el.html
A template in a file can be updated with a new time stamp when
you save the file. For example:
static char *ts = "sdmain.c Time-stamp: <2020-04-18 14:10:21 gildea>";
To use time-stamping, add this line to your init file:
(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
and time-stamp-toggle-active for details.
Defined variables (12)
time-stamp-active | Non-nil to enable time-stamping of buffers by M-x time-stamp. |
time-stamp-conversion-warn | Enable warnings about soon-to-be-unsupported forms in ‘time-stamp-format’. |
time-stamp-count | How many templates M-x time-stamp will look for in a buffer. |
time-stamp-end | Regexp marking the text after the time stamp. |
time-stamp-format | Format of the string inserted by M-x time-stamp. |
time-stamp-inserts-lines | Whether M-x time-stamp can change the number of lines in a file. |
time-stamp-line-limit | Lines of a file searched; positive counts from start, negative from end. |
time-stamp-no-file | String to use when the buffer is not associated with a file. |
time-stamp-pattern | Convenience variable setting all ‘time-stamp’ location and format values. |
time-stamp-start | Regexp after which the time stamp is written by M-x time-stamp. |
time-stamp-time-zone | The time zone to be used by M-x time-stamp. |
time-stamp-warn-inactive | Have M-x time-stamp warn if a buffer did not get time-stamped. |
Defined functions (10)
time-stamp | () |
time-stamp--format | (FORMAT TIME) |
time-stamp-conv-warn | (OLD-FORM NEW-FORM) |
time-stamp-do-number | (FORMAT-CHAR ALT-FORM FIELD-WIDTH TIME) |
time-stamp-formatz-from-parsed-options | (FLAG-MINIMIZE FLAG-PAD-SPACES-ONLY FLAG-PAD-ZEROS-FIRST COLON-COUNT FIELD-WIDTH OFFSET-SECS) |
time-stamp-once | (START SEARCH-LIMIT TS-START TS-END TS-FORMAT FORMAT-LINES END-LINES) |
time-stamp-string | (&optional TS-FORMAT TIME) |
time-stamp-string-preprocess | (FORMAT &optional TIME) |
time-stamp-toggle-active | (&optional ARG) |
time-stamp-zone-type-p | (ZONE) |