aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1997-04-13 20:08:59 +0000
committerRichard M. Stallman1997-04-13 20:08:59 +0000
commitcb35a83c0e5942a08de4d5ab2ca6dbd378ac1993 (patch)
treeb6c7136a3691b19d6a6d815ce75804b25089d63c
parentd128fe857109398139e3e0fbc3cb8a9f8a45c876 (diff)
downloademacs-cb35a83c0e5942a08de4d5ab2ca6dbd378ac1993.tar.gz
emacs-cb35a83c0e5942a08de4d5ab2ca6dbd378ac1993.zip
Add defgroup; use defcustom for user vars.
-rw-r--r--lisp/time-stamp.el33
1 files changed, 24 insertions, 9 deletions
diff --git a/lisp/time-stamp.el b/lisp/time-stamp.el
index 85351d741f8..77b1a64646a 100644
--- a/lisp/time-stamp.el
+++ b/lisp/time-stamp.el
@@ -40,27 +40,40 @@
40;; Originally based on the 19 Dec 88 version of 40;; Originally based on the 19 Dec 88 version of
41;; date.el by John Sturdy <mcvax!harlqn.co.uk!jcgs@uunet.uu.net> 41;; date.el by John Sturdy <mcvax!harlqn.co.uk!jcgs@uunet.uu.net>
42;; Version 2, January 1995: replaced functions with %-escapes 42;; Version 2, January 1995: replaced functions with %-escapes
43;; $Id: time-stamp.el,v 1.23 1996/12/17 00:19:01 rms Exp rms $ 43;; $Id: time-stamp.el,v 1.24 1996/12/18 02:45:09 rms Exp rms $
44 44
45;;; Code: 45;;; Code:
46 46
47(defvar time-stamp-active t 47(defgroup time-stamp nil
48 "Maintain last change time stamps in files edited by Emacs."
49 :group 'data
50 :group 'extensions)
51
52(defcustom time-stamp-active t
48 "*Non-nil to enable time-stamping of buffers by \\[time-stamp]. 53 "*Non-nil to enable time-stamping of buffers by \\[time-stamp].
49Can be toggled by \\[time-stamp-toggle-active]. 54Can be toggled by \\[time-stamp-toggle-active].
50See also the variable `time-stamp-warn-inactive'.") 55See also the variable `time-stamp-warn-inactive'."
56 :type 'boolean
57 :group 'time-stamp)
51 58
52(defvar time-stamp-warn-inactive t 59(defcustom time-stamp-warn-inactive t
53 "Non-nil to have \\[time-stamp] warn if a buffer did not get time-stamped. 60 "Non-nil to have \\[time-stamp] warn if a buffer did not get time-stamped.
54A warning is printed if `time-stamp-active' is nil and the buffer contains 61A warning is printed if `time-stamp-active' is nil and the buffer contains
55a time stamp template that would otherwise have been updated.") 62a time stamp template that would otherwise have been updated."
63 :type 'boolean
64 :group 'time-stamp)
56 65
57(defvar time-stamp-old-format-warn 'ask 66(defcustom time-stamp-old-format-warn 'ask
58 "Action to take if `time-stamp-format' is an old-style list. 67 "Action to take if `time-stamp-format' is an old-style list.
59If `error', the format is not used. If `ask', the user is queried about 68If `error', the format is not used. If `ask', the user is queried about
60using the time-stamp-format. If `warn', a warning is displayed. 69using the time-stamp-format. If `warn', a warning is displayed.
61If nil, no notification is given.") 70If nil, no notification is given."
71 :type '(choice (const :tag "No modification" nil)
72 (const :tag "Don't use the format" error)
73 (const ask) (const warn))
74 :group 'time-stamp)
62 75
63(defvar time-stamp-format "%Y-%m-%d %H:%M:%S %u" 76(defcustom time-stamp-format "%02y/%02m/%02d %02H:%02M:%02S %u"
64 "*Format of the string inserted by \\[time-stamp]. 77 "*Format of the string inserted by \\[time-stamp].
65The value may be a string or a list. Lists are supported only for 78The value may be a string or a list. Lists are supported only for
66backward compatibility; see variable `time-stamp-old-format-warn'. 79backward compatibility; see variable `time-stamp-old-format-warn'.
@@ -76,7 +89,9 @@ you can use the following %-constructs:
76%F full file name 89%F full file name
77%h mail host name 90%h mail host name
78%s system name 91%s system name
79%u user's login name") 92%u user's login name"
93 :type 'string
94 :group 'time-stamp)
80 95
81;;; Do not change time-stamp-line-limit, time-stamp-start, or 96;;; Do not change time-stamp-line-limit, time-stamp-start, or
82;;; time-stamp-end in your .emacs or you will be incompatible 97;;; time-stamp-end in your .emacs or you will be incompatible