aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorStephen Gildea2020-01-24 09:15:44 -0800
committerStephen Gildea2020-01-24 09:16:19 -0800
commitfd0919678189dd8a5e4ad13d3982b248d50af525 (patch)
treee41c309f29c485dd0a9f0f269beb60beac664a84 /lisp
parent0bed550e210b2dfe898a0755592db5747fb3da37 (diff)
downloademacs-fd0919678189dd8a5e4ad13d3982b248d50af525.tar.gz
emacs-fd0919678189dd8a5e4ad13d3982b248d50af525.zip
; Clarify what time-stamp-active enables
Fix documentation strings and comments for time-stamp. Most notably: * lisp/time-stamp.el (time-stamp-active): in the doc string, clarify that time-stamp-active does not add time-stamp to any hook.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/time-stamp.el23
1 files changed, 15 insertions, 8 deletions
diff --git a/lisp/time-stamp.el b/lisp/time-stamp.el
index a09294d9cf6..7c64f2903be 100644
--- a/lisp/time-stamp.el
+++ b/lisp/time-stamp.el
@@ -94,6 +94,13 @@ edited by older versions of Emacs also, do not use this format yet."
94(defcustom time-stamp-active t 94(defcustom time-stamp-active t
95 "Non-nil to enable time-stamping of buffers by \\[time-stamp]. 95 "Non-nil to enable time-stamping of buffers by \\[time-stamp].
96Can be toggled by \\[time-stamp-toggle-active]. 96Can be toggled by \\[time-stamp-toggle-active].
97
98This option does not affect when `time-stamp' is run, only what it
99does when it runs. To activate automatic time-stamping of buffers
100when they are saved, either add this line to your init file:
101 (add-hook \\='before-save-hook \\='time-stamp)
102or customize option `before-save-hook'.
103
97See also the variable `time-stamp-warn-inactive'." 104See also the variable `time-stamp-warn-inactive'."
98 :type 'boolean 105 :type 'boolean
99 :group 'time-stamp) 106 :group 'time-stamp)
@@ -269,7 +276,7 @@ time-stamped file itself.")
269A template in a file can be automatically updated with a new time stamp 276A template in a file can be automatically updated with a new time stamp
270every time you save the file. Add this line to your init file: 277every time you save the file. Add this line to your init file:
271 (add-hook \\='before-save-hook \\='time-stamp) 278 (add-hook \\='before-save-hook \\='time-stamp)
272or customize `before-save-hook' through Custom. 279or customize option `before-save-hook'.
273Normally the template must appear in the first 8 lines of a file and 280Normally the template must appear in the first 8 lines of a file and
274look like one of the following: 281look like one of the following:
275 Time-stamp: <> 282 Time-stamp: <>
@@ -606,24 +613,24 @@ and all `time-stamp-format' compatibility."
606 ((eq cur-char ?F) ;buffer-file-name, full path 613 ((eq cur-char ?F) ;buffer-file-name, full path
607 (or buffer-file-name 614 (or buffer-file-name
608 time-stamp-no-file)) 615 time-stamp-no-file))
609 ((eq cur-char ?s) ;system name 616 ((eq cur-char ?s) ;system name, legacy
610 (system-name)) 617 (system-name))
611 ((eq cur-char ?u) ;user name 618 ((eq cur-char ?u) ;user name, legacy
612 (user-login-name)) 619 (user-login-name))
613 ((eq cur-char ?U) ;user full name 620 ((eq cur-char ?U) ;user full name, legacy
614 (user-full-name)) 621 (user-full-name))
615 ((eq cur-char ?l) ;logname (undocumented user name alt) 622 ((eq cur-char ?l) ;login name
616 (user-login-name)) 623 (user-login-name))
617 ((eq cur-char ?L) ;(undocumented alt user full name) 624 ((eq cur-char ?L) ;full name of logged-in user
618 (user-full-name)) 625 (user-full-name))
619 ((eq cur-char ?h) ;mail host name 626 ((eq cur-char ?h) ;mail host name
620 (or mail-host-address (system-name))) 627 (or mail-host-address (system-name)))
621 ((eq cur-char ?q) ;(undocumented unqual hostname) 628 ((eq cur-char ?q) ;unqualified host name
622 (let ((qualname (system-name))) 629 (let ((qualname (system-name)))
623 (if (string-match "\\." qualname) 630 (if (string-match "\\." qualname)
624 (substring qualname 0 (match-beginning 0)) 631 (substring qualname 0 (match-beginning 0))
625 qualname))) 632 qualname)))
626 ((eq cur-char ?Q) ;(undocumented fully-qualified host) 633 ((eq cur-char ?Q) ;fully-qualified host name
627 (system-name)) 634 (system-name))
628 )) 635 ))
629 (and (numberp field-result) 636 (and (numberp field-result)