summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp')
-rw-r--r--lisp/time-stamp.el20
1 files changed, 18 insertions, 2 deletions
diff --git a/lisp/time-stamp.el b/lisp/time-stamp.el
index 094ef915265..6b1ff3e618c 100644
--- a/lisp/time-stamp.el
+++ b/lisp/time-stamp.el
@@ -109,10 +109,26 @@ Its format is that of the ZONE argument of the `format-time-string' function."
:type '(choice (const :tag "Emacs local time" nil)
(const :tag "Universal Time" t)
(const :tag "system wall clock time" wall)
- (string :tag "TZ environment variable value"))
+ (string :tag "TZ environment variable value")
+ (list :tag "Offset and name"
+ (integer :tag "Offset (seconds east of UTC)")
+ (string :tag "Time zone abbreviation"))
+ (integer :tag "Offset (seconds east of UTC)"))
:group 'time-stamp
:version "20.1")
-;;;###autoload(put 'time-stamp-time-zone 'safe-local-variable 'string-or-null-p)
+;;;###autoload(put 'time-stamp-time-zone 'safe-local-variable 'time-stamp-zone-type-p)
+
+;;;###autoload
+(defun time-stamp-zone-type-p (zone)
+ "Return whether or not ZONE is of the correct type for a timezone rule.
+Valid ZONE values are described in the documentation of `format-time-string'."
+ (or (memq zone '(nil t wall))
+ (stringp zone)
+ (and (consp zone)
+ (integerp (car zone))
+ (consp (cdr zone))
+ (stringp (cadr zone)))
+ (integerp zone)))
;;; Do not change time-stamp-line-limit, time-stamp-start,
;;; time-stamp-end, time-stamp-pattern, time-stamp-inserts-lines,