mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2026-09-10 07:46:51 -04:00
current-time-list now defaults to nil
Change the default value from current-time-list from t to nil. This continues the transition that was begun in Emacs 29, so that functions like current-time generate timestamps in the more-efficient and more-consistent (TICKS . HZ) form. * src/timefns.c: Default to false.
This commit is contained in:
parent
21c979ee60
commit
57c5967828
|
|
@ -15206,12 +15206,13 @@ nil
|
|||
100
|
||||
@end group
|
||||
@group
|
||||
(20615 27034 579989 697000)
|
||||
(17905 55681 0 0)
|
||||
(20615 26327 734791 805000)@footnote{If @code{current-time-list} is
|
||||
@code{nil} the three timestamps are @code{(1351051674579989697
|
||||
. 1000000000)}, @code{(1173477761000000000 . 1000000000)}, and
|
||||
@code{(1351050967734791805 . 1000000000)}, respectively.}
|
||||
(1351051674579989697 . 1000000000)
|
||||
(1173477761000000000 . 1000000000)
|
||||
(1351050967734791805 . 1000000000)@footnote{If @code{current-time-list} is
|
||||
@code{t} the three timestamps are
|
||||
@code{(20615 27034 579989 697000)},
|
||||
@code{(17905 55681 0 0)}, and
|
||||
@code{(20615 26327 734791 805000)}, respectively.}
|
||||
13188
|
||||
"-rw-r--r--"
|
||||
@end group
|
||||
|
|
|
|||
|
|
@ -1467,20 +1467,20 @@ is owned by the user with name @samp{lh}.
|
|||
@item "users"
|
||||
is in the group with name @samp{users}.
|
||||
|
||||
@item (20614 64019 50040 152000)
|
||||
@item (1351023123050040152 . 1000000000)
|
||||
was last accessed on October 23, 2012, at 20:12:03.050040152 UTC@.
|
||||
(This timestamp is @code{(1351023123050040152 . 1000000000)}
|
||||
if @code{current-time-list} is @code{nil}.)
|
||||
(This timestamp is @code{(20614 64019 50040 152000)}
|
||||
if @code{current-time-list} is @code{t}.)
|
||||
|
||||
@item (20000 23 0 0)
|
||||
@item (1310720023000000000 . 1000000000)
|
||||
was last modified on July 15, 2001, at 08:53:43.000000000 UTC@.
|
||||
(This timestamp is @code{(1310720023000000000 . 1000000000)}
|
||||
if @code{current-time-list} is @code{nil}.)
|
||||
(This timestamp is @code{(20000 23 0 0)}
|
||||
if @code{current-time-list} is @code{t}.)
|
||||
|
||||
@item (20614 64555 902289 872000)
|
||||
@item (1351023659902289872 . 1000000000)
|
||||
last had its status changed on October 23, 2012, at 20:20:59.902289872 UTC@.
|
||||
(This timestamp is @code{(1351023659902289872 . 1000000000)}
|
||||
if @code{current-time-list} is @code{nil}.)
|
||||
(This timestamp is @code{(20614 64555 902289 872000)}
|
||||
if @code{current-time-list} is @code{t}.)
|
||||
|
||||
@item 122295
|
||||
is 122295 bytes long. (It may not contain 122295 characters, though,
|
||||
|
|
|
|||
|
|
@ -504,11 +504,11 @@ if the information is not available.
|
|||
@example
|
||||
@group
|
||||
emacs-build-time
|
||||
@result{} (25194 55894 8547 617000)
|
||||
@result{} (1651169878008547617 . 1000000000)
|
||||
@end group
|
||||
@end example
|
||||
(This timestamp is @code{(1651169878008547617 . 1000000000)}
|
||||
if @code{current-time-list} was @code{nil} when Emacs was built.)
|
||||
(This timestamp is @code{(25194 55894 8547 617000)}
|
||||
if @code{current-time-list} was @code{t} when Emacs was built.)
|
||||
@end defvar
|
||||
|
||||
@defvar emacs-version
|
||||
|
|
|
|||
|
|
@ -1447,15 +1447,13 @@ The operating system limits the range of time and zone values.
|
|||
@end defun
|
||||
|
||||
@defvar current-time-list
|
||||
This boolean variable is a transition aid. If @code{t},
|
||||
@code{current-time} and related functions return timestamps in list
|
||||
form, typically @code{(@var{high} @var{low} @var{micro} @var{pico})};
|
||||
otherwise, they use @code{(@var{ticks} . @var{hz})} form. Currently
|
||||
this variable defaults to @code{t}, for behavior compatible with
|
||||
previous Emacs versions. Developers are encouraged to test
|
||||
timestamp-related code with this variable set to @code{nil}, as it
|
||||
will default to @code{nil} in a future Emacs version, and will be
|
||||
removed in some version after that.
|
||||
This boolean variable is a transition aid. If @code{nil} (the default),
|
||||
@code{current-time} and related functions return timestamps in
|
||||
@code{(@var{ticks} . @var{hz})} form. If @code{t}, these functions
|
||||
return in list form, typically @code{(@var{high} @var{low} @var{micro}
|
||||
@var{pico})}, for behavior compatible with previous Emacs versions.
|
||||
As it is merely a transition aid, this variable is planned to be removed
|
||||
in some future Emacs version.
|
||||
@end defvar
|
||||
|
||||
@defun current-time
|
||||
|
|
|
|||
5
etc/NEWS
5
etc/NEWS
|
|
@ -226,6 +226,11 @@ pattern does not match its corresponding value. This can be useful for
|
|||
destructuring values when you do not wish to continue if the
|
||||
corresponding value is not as expected.
|
||||
|
||||
+++
|
||||
** The transition variable 'current-time-list' now defaults to nil,
|
||||
so timestamps now default to (TICKS . HZ) form instead of the older
|
||||
(HIGH LOW USEC PSEC) form.
|
||||
|
||||
|
||||
* Lisp Changes in Emacs 32.1
|
||||
|
||||
|
|
|
|||
|
|
@ -66,11 +66,9 @@ enum { TM_YEAR_BASE = 1900 };
|
|||
# define FASTER_TIMEFNS 1
|
||||
#endif
|
||||
|
||||
/* current-time-list defaults to t, typically generating (HI LO US PS)
|
||||
timestamps. To change the default to nil, generating (TICKS . HZ)
|
||||
timestamps, compile with -DCURRENT_TIME_LIST=0. */
|
||||
/* current-time-list defaults to nil, generating (TICKS . HZ) timestamps. */
|
||||
#ifndef CURRENT_TIME_LIST
|
||||
enum { CURRENT_TIME_LIST = true };
|
||||
enum { CURRENT_TIME_LIST = false };
|
||||
#endif
|
||||
|
||||
#if FASTER_TIMEFNS && !FIXNUM_OVERFLOW_P (1000000000)
|
||||
|
|
@ -2112,14 +2110,12 @@ syms_of_timefns (void)
|
|||
DEFVAR_BOOL ("current-time-list", current_time_list,
|
||||
doc: /* Whether `current-time' should return list or (TICKS . HZ) form.
|
||||
|
||||
This boolean variable is a transition aid. If t, `current-time' and
|
||||
related functions return timestamps in list form, typically
|
||||
\(HIGH LOW USEC PSEC); otherwise, they use (TICKS . HZ) form.
|
||||
Currently this variable defaults to t, for behavior compatible with
|
||||
previous Emacs versions. Developers are encouraged to test
|
||||
timestamp-related code with this variable set to nil, as it will
|
||||
default to nil in a future Emacs version, and will be removed in some
|
||||
version after that. */);
|
||||
This boolean variable is a transition aid. If nil (the default),
|
||||
`current-time' and related functions return timestamps in (TICKS . HZ)
|
||||
form. If t, these functions return in list form, typically (HIGH LOW
|
||||
USEC PSEC), for behavior compatible with previous Emacs versions. As it
|
||||
is merely a transition aid, this variable is planned to be removed in
|
||||
some future Emacs version. */);
|
||||
current_time_list = CURRENT_TIME_LIST;
|
||||
|
||||
defsubr (&Scurrent_time);
|
||||
|
|
|
|||
Loading…
Reference in a new issue