aboutsummaryrefslogtreecommitdiffstats
path: root/src/editfns.c
diff options
context:
space:
mode:
authorLuc Teirlinck2004-07-09 23:38:54 +0000
committerLuc Teirlinck2004-07-09 23:38:54 +0000
commit5668fbb8b1b555208ea82664ee4ecbbf3833467d (patch)
treef3984e4333fca06d7d3ed9226ad2d61b73327f12 /src/editfns.c
parent80a7a1bff5f11ce9635e7d28398d0874a68a410a (diff)
downloademacs-5668fbb8b1b555208ea82664ee4ecbbf3833467d.tar.gz
emacs-5668fbb8b1b555208ea82664ee4ecbbf3833467d.zip
(Ffloat_time, Fformat_time_string, Fdecode_time)
(Fcurrent_time_string, Fcurrent_time_zone): Mention in docstrings that time values of the type (HIGH . LOW) are considered obsolete.
Diffstat (limited to 'src/editfns.c')
-rw-r--r--src/editfns.c59
1 files changed, 29 insertions, 30 deletions
diff --git a/src/editfns.c b/src/editfns.c
index 9fbdc0363bb..a506c5f4fc8 100644
--- a/src/editfns.c
+++ b/src/editfns.c
@@ -1431,10 +1431,10 @@ lisp_time_argument (specified_time, result, usec)
1431DEFUN ("float-time", Ffloat_time, Sfloat_time, 0, 1, 0, 1431DEFUN ("float-time", Ffloat_time, Sfloat_time, 0, 1, 0,
1432 doc: /* Return the current time, as a float number of seconds since the epoch. 1432 doc: /* Return the current time, as a float number of seconds since the epoch.
1433If SPECIFIED-TIME is given, it is the time to convert to float 1433If SPECIFIED-TIME is given, it is the time to convert to float
1434instead of the current time. The argument should have the forms: 1434instead of the current time. The argument should have the form
1435 (HIGH . LOW) or (HIGH LOW USEC) or (HIGH LOW . USEC). 1435(HIGH LOW . IGNORED). Thus, you can use times obtained from
1436Thus, you can use times obtained from `current-time' 1436`current-time' and from `file-attributes'. SPECIFIED-TIME can also
1437and from `file-attributes'. 1437have the form (HIGH . LOW), but this is considered obsolete.
1438 1438
1439WARNING: Since the result is floating point, it may not be exact. 1439WARNING: Since the result is floating point, it may not be exact.
1440Do not use this function if precise time stamps are required. */) 1440Do not use this function if precise time stamps are required. */)
@@ -1506,8 +1506,9 @@ emacs_memftimeu (s, maxsize, format, format_len, tp, ut)
1506 1506
1507DEFUN ("format-time-string", Fformat_time_string, Sformat_time_string, 1, 3, 0, 1507DEFUN ("format-time-string", Fformat_time_string, Sformat_time_string, 1, 3, 0,
1508 doc: /* Use FORMAT-STRING to format the time TIME, or now if omitted. 1508 doc: /* Use FORMAT-STRING to format the time TIME, or now if omitted.
1509TIME is specified as (HIGH LOW . IGNORED) or (HIGH . LOW), as returned by 1509TIME is specified as (HIGH LOW . IGNORED), as returned by
1510`current-time' or `file-attributes'. 1510`current-time' or `file-attributes'. The obsolete form (HIGH . LOW)
1511is also still accepted.
1511The third, optional, argument UNIVERSAL, if non-nil, means describe TIME 1512The third, optional, argument UNIVERSAL, if non-nil, means describe TIME
1512as Universal Time; nil means describe TIME in the local time zone. 1513as Universal Time; nil means describe TIME in the local time zone.
1513The value is a copy of FORMAT-STRING, but with certain constructs replaced 1514The value is a copy of FORMAT-STRING, but with certain constructs replaced
@@ -1603,17 +1604,19 @@ For example, to produce full ISO 8601 format, use "%Y-%m-%dT%T%z". */)
1603 1604
1604DEFUN ("decode-time", Fdecode_time, Sdecode_time, 0, 1, 0, 1605DEFUN ("decode-time", Fdecode_time, Sdecode_time, 0, 1, 0,
1605 doc: /* Decode a time value as (SEC MINUTE HOUR DAY MONTH YEAR DOW DST ZONE). 1606 doc: /* Decode a time value as (SEC MINUTE HOUR DAY MONTH YEAR DOW DST ZONE).
1606The optional SPECIFIED-TIME should be a list of (HIGH LOW . IGNORED) 1607The optional SPECIFIED-TIME should be a list of (HIGH LOW . IGNORED),
1607or (HIGH . LOW), as from `current-time' and `file-attributes', or `nil' 1608as from `current-time' and `file-attributes', or `nil' to use the
1608to use the current time. The list has the following nine members: 1609current time. The obsolete form (HIGH . LOW) is also still accepted.
1609SEC is an integer between 0 and 60; SEC is 60 for a leap second, which 1610The list has the following nine members: SEC is an integer between 0
1610only some operating systems support. MINUTE is an integer between 0 and 59. 1611and 60; SEC is 60 for a leap second, which only some operating systems
1611HOUR is an integer between 0 and 23. DAY is an integer between 1 and 31. 1612support. MINUTE is an integer between 0 and 59. HOUR is an integer
1612MONTH is an integer between 1 and 12. YEAR is an integer indicating the 1613between 0 and 23. DAY is an integer between 1 and 31. MONTH is an
1613four-digit year. DOW is the day of week, an integer between 0 and 6, where 1614integer between 1 and 12. YEAR is an integer indicating the
16140 is Sunday. DST is t if daylight savings time is effect, otherwise nil. 1615four-digit year. DOW is the day of week, an integer between 0 and 6,
1615ZONE is an integer indicating the number of seconds east of Greenwich. 1616where 0 is Sunday. DST is t if daylight savings time is effect,
1616(Note that Common Lisp has different meanings for DOW and ZONE.) */) 1617otherwise nil. ZONE is an integer indicating the number of seconds
1618east of Greenwich. (Note that Common Lisp has different meanings for
1619DOW and ZONE.) */)
1617 (specified_time) 1620 (specified_time)
1618 Lisp_Object specified_time; 1621 Lisp_Object specified_time;
1619{ 1622{
@@ -1745,13 +1748,11 @@ The format is `Sun Sep 16 01:03:52 1973'.
1745However, see also the functions `decode-time' and `format-time-string' 1748However, see also the functions `decode-time' and `format-time-string'
1746which provide a much more powerful and general facility. 1749which provide a much more powerful and general facility.
1747 1750
1748If SPECIFIED-TIME is given, it is a time to format instead 1751If SPECIFIED-TIME is given, it is a time to format instead of the
1749of the current time. The argument should have the form: 1752current time. The argument should have the form (HIGH LOW . IGNORED).
1750 (HIGH . LOW) 1753Thus, you can use times obtained from `current-time' and from
1751or the form: 1754`file-attributes'. SPECIFIED-TIME can also have the form (HIGH . LOW),
1752 (HIGH LOW . IGNORED). 1755but this is considered obsolete. */)
1753Thus, you can use times obtained from `current-time'
1754and from `file-attributes'. */)
1755 (specified_time) 1756 (specified_time)
1756 Lisp_Object specified_time; 1757 Lisp_Object specified_time;
1757{ 1758{
@@ -1802,12 +1803,10 @@ OFFSET is an integer number of seconds ahead of UTC (east of Greenwich).
1802 A negative value means west of Greenwich. 1803 A negative value means west of Greenwich.
1803NAME is a string giving the name of the time zone. 1804NAME is a string giving the name of the time zone.
1804If SPECIFIED-TIME is given, the time zone offset is determined from it 1805If SPECIFIED-TIME is given, the time zone offset is determined from it
1805instead of using the current time. The argument should have the form: 1806instead of using the current time. The argument should have the form
1806 (HIGH . LOW) 1807(HIGH LOW . IGNORED). Thus, you can use times obtained from
1807or the form: 1808`current-time' and from `file-attributes'. SPECIFIED-TIME can also
1808 (HIGH LOW . IGNORED). 1809have the form (HIGH . LOW), but this is considered obsolete.
1809Thus, you can use times obtained from `current-time'
1810and from `file-attributes'.
1811 1810
1812Some operating systems cannot provide all this information to Emacs; 1811Some operating systems cannot provide all this information to Emacs;
1813in this case, `current-time-zone' returns a list containing nil for 1812in this case, `current-time-zone' returns a list containing nil for