]> git.eshelyaron.com Git - emacs.git/commitdiff
Default decoded-time dst slot to -1
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 13 Jun 2022 21:25:58 +0000 (14:25 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 13 Jun 2022 21:27:28 +0000 (14:27 -0700)
* lisp/simple.el (decoded-time): Default dst slot to -1.
Improve related doc strings.

lisp/calendar/time-date.el
lisp/simple.el

index 40374c3bb4ec70beccc5186f29bc87147d41faf7..d19134db832b107193c5c6e2d679c60f3b99612a 100644 (file)
@@ -557,7 +557,8 @@ changes in daylight saving time are not taken into account."
   (list second minute hour day month year nil dst zone))
 
 (defun decoded-time-set-defaults (time &optional default-zone)
-  "Set any nil values in `decoded-time' TIME to default values.
+  "Set most nil values in `decoded-time' TIME to default values.
+This can set TIME's year, month, day, hour, minute and second.
 The default value is based on January 1st, 1970 at midnight.
 This year is used to guarantee portability; see Info
 node `(elisp) Time of Day'.
index f6932339c9986bdc1f308f65a335c99715ebe86a..05a0855a964352146e503ad6e1f789547e535991 100644 (file)
@@ -10511,10 +10511,10 @@ This is an integer between 1 and 12 (inclusive).  January is 1.")
   (year nil :documentation "This is a four digit integer.")
   (weekday nil :documentation "\
 This is a number between 0 and 6, and 0 is Sunday.")
-  (dst nil :documentation "\
+  (dst -1 :documentation "\
 This is t if daylight saving time is in effect, nil if it is not
-in effect, and -1 if daylight saving information is not
-available.")
+in effect, and -1 if daylight saving information is not available.
+Also see `decoded-time-dst'.")
   (zone nil :documentation "\
 This is an integer indicating the UTC offset in seconds, i.e.,
 the number of seconds east of Greenwich.")
@@ -10524,9 +10524,13 @@ the number of seconds east of Greenwich.")
 ;; It should return -1 indicating unknown DST, but currently returns
 ;; nil indicating standard time.
 (put 'decoded-time-dst 'function-documentation
-     (append (get 'decoded-time-dst 'function-documentation)
-             "As a special case, `decoded-time-dst' returns an unspecified
-value when given a list too short to have a dst element."))
+     "Access slot \"dst\" of `decoded-time' struct CL-X.
+This is t if daylight saving time is in effect, nil if it is not
+in effect, and -1 if daylight saving information is not available.
+As a special case, return an unspecified value when given a list
+too short to have a dst element.
+
+(fn CL-X)")
 
 (defun get-scratch-buffer-create ()
   "Return the *scratch* buffer, creating a new one if needed."