aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Gildea2025-03-29 16:48:58 -0700
committerStephen Gildea2025-03-29 16:53:23 -0700
commit5d620aefae267a12b4046606f85e6f2865d729da (patch)
tree8d470ce9d740bd1060c2fb1f8e3c310a6ee45db7
parenta5126f79a163192947acb18a32e199c588be7c4a (diff)
downloademacs-5d620aefae267a12b4046606f85e6f2865d729da.tar.gz
emacs-5d620aefae267a12b4046606f85e6f2865d729da.zip
time-stamp source commentary: point to manual section
* lisp/time-stamp.el: Add an Info link in the commentary, now that the manual has more to say. * doc/emacs/files.texi (Time Stamps for One File): Expand one consistent example.
-rw-r--r--doc/emacs/files.texi2
-rw-r--r--lisp/time-stamp.el5
2 files changed, 4 insertions, 3 deletions
diff --git a/doc/emacs/files.texi b/doc/emacs/files.texi
index 0a63da4217d..6128be8f128 100644
--- a/doc/emacs/files.texi
+++ b/doc/emacs/files.texi
@@ -1132,7 +1132,7 @@ To extend one of the previous examples:
1132@group 1132@group
1133// Local variables: 1133// Local variables:
1134// eval: (add-hook 'before-save-hook 'time-stamp nil t) 1134// eval: (add-hook 'before-save-hook 'time-stamp nil t)
1135// time-stamp-pattern: "year_published = \"%Y\"" 1135// time-stamp-pattern: "Published %Y in Boston"
1136// End: 1136// End:
1137@end group 1137@end group
1138@end example 1138@end example
diff --git a/lisp/time-stamp.el b/lisp/time-stamp.el
index ffe5c072286..faf5d51d441 100644
--- a/lisp/time-stamp.el
+++ b/lisp/time-stamp.el
@@ -25,13 +25,14 @@
25 25
26;; A template in a file can be updated with a new time stamp when 26;; A template in a file can be updated with a new time stamp when
27;; you save the file. For example: 27;; you save the file. For example:
28;; static char *ts = "sdmain.c Time-stamp: <2024-04-18 14:10:21 gildea>"; 28;; static char *ts = "sdmain.c Time-stamp: <2025-03-28 21:31:56 gildea>";
29 29
30;; To use time-stamping, add this line to your init file: 30;; To use time-stamping, add this line to your init file:
31;; (add-hook 'before-save-hook 'time-stamp) 31;; (add-hook 'before-save-hook 'time-stamp)
32;; Now any time-stamp templates in your files will be updated automatically. 32;; Now any time-stamp templates in your files will be updated automatically.
33 33
34;; See the documentation for the function `time-stamp' for details. 34;; For details, see the documentation for function `time-stamp'
35;; and the Info node `Time Stamps'.
35 36
36;;; Code: 37;;; Code:
37 38