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
before-save-hook to add the function
time-stamp to arrange this. It you use Custom to do this,
time-stamp is conveniently listed as an option in the
The time stamp is updated only if the customizable variable
time-stamp-active is on, which it is by default; the command
time-stamp-toggle-active can be used to toggle it. The format of
the time stamp is set by the customizable variable
time-stamp-inserts-lines control finding the template. Do not
change these in your init file or you will be incompatible with other
people's files. If you must change them, do so only in the local
variables section of the file itself.
Normally the template must appear in the first 8 lines of a file and look like one of the following:
Time-stamp: <> Time-stamp: " "
The time stamp is written between the brackets or quotes:
Time-stamp: <1998-02-18 10:20:51 gildea>