aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert2016-11-19 14:43:25 -0800
committerPaul Eggert2016-11-19 14:43:25 -0800
commit870c56a0bd8fe51baa2efa20a75b848f2bd27fd4 (patch)
tree411a65a0f148e4df8ca1e43ce103c2d96badaccf /src
parent6a03b47f81c5a8f44d7bc524fce93d6f63dc4d08 (diff)
parent07f45d77816c947d90e1c56d489a6b32bdacdda0 (diff)
downloademacs-870c56a0bd8fe51baa2efa20a75b848f2bd27fd4.tar.gz
emacs-870c56a0bd8fe51baa2efa20a75b848f2bd27fd4.zip
Merge from origin/emacs-25
07f45d7 ; Spelling fix 1a210f0 * admin/release-process: Update versions and blocking bug num... 36bafc9 Improve documentation of functions that accept time values # Conflicts: # admin/release-process # src/editfns.c
Diffstat (limited to 'src')
-rw-r--r--src/editfns.c33
1 files changed, 22 insertions, 11 deletions
diff --git a/src/editfns.c b/src/editfns.c
index 4f6108102db..70c53830515 100644
--- a/src/editfns.c
+++ b/src/editfns.c
@@ -1609,21 +1609,28 @@ time_arith (Lisp_Object a, Lisp_Object b,
1609} 1609}
1610 1610
1611DEFUN ("time-add", Ftime_add, Stime_add, 2, 2, 0, 1611DEFUN ("time-add", Ftime_add, Stime_add, 2, 2, 0,
1612 doc: /* Return the sum of two time values A and B, as a time value. */) 1612 doc: /* Return the sum of two time values A and B, as a time value.
1613A nil value for either argument stands for the current time.
1614See `current-time-string' for the various forms of a time value. */)
1613 (Lisp_Object a, Lisp_Object b) 1615 (Lisp_Object a, Lisp_Object b)
1614{ 1616{
1615 return time_arith (a, b, time_add); 1617 return time_arith (a, b, time_add);
1616} 1618}
1617 1619
1618DEFUN ("time-subtract", Ftime_subtract, Stime_subtract, 2, 2, 0, 1620DEFUN ("time-subtract", Ftime_subtract, Stime_subtract, 2, 2, 0,
1619 doc: /* Return the difference between two time values A and B, as a time value. */) 1621 doc: /* Return the difference between two time values A and B, as a time value.
1622Use `float-time' to convert the difference into elapsed seconds.
1623A nil value for either argument stands for the current time.
1624See `current-time-string' for the various forms of a time value. */)
1620 (Lisp_Object a, Lisp_Object b) 1625 (Lisp_Object a, Lisp_Object b)
1621{ 1626{
1622 return time_arith (a, b, time_subtract); 1627 return time_arith (a, b, time_subtract);
1623} 1628}
1624 1629
1625DEFUN ("time-less-p", Ftime_less_p, Stime_less_p, 2, 2, 0, 1630DEFUN ("time-less-p", Ftime_less_p, Stime_less_p, 2, 2, 0,
1626 doc: /* Return non-nil if time value T1 is earlier than time value T2. */) 1631 doc: /* Return non-nil if time value T1 is earlier than time value T2.
1632A nil value for either argument stands for the current time.
1633See `current-time-string' for the various forms of a time value. */)
1627 (Lisp_Object t1, Lisp_Object t2) 1634 (Lisp_Object t1, Lisp_Object t2)
1628{ 1635{
1629 int t1len, t2len; 1636 int t1len, t2len;
@@ -2001,10 +2008,11 @@ emacs_nmemftime (char *s, size_t maxsize, const char *format,
2001} 2008}
2002 2009
2003DEFUN ("format-time-string", Fformat_time_string, Sformat_time_string, 1, 3, 0, 2010DEFUN ("format-time-string", Fformat_time_string, Sformat_time_string, 1, 3, 0,
2004 doc: /* Use FORMAT-STRING to format the time TIME, or now if omitted. 2011 doc: /* Use FORMAT-STRING to format the time TIME, or now if omitted or nil.
2005TIME is specified as (HIGH LOW USEC PSEC), as returned by 2012TIME is specified as (HIGH LOW USEC PSEC), as returned by
2006`current-time' or `file-attributes'. The obsolete form (HIGH . LOW) 2013`current-time' or `file-attributes'. It can also be a single integer
2007is also still accepted. 2014number of seconds since the epoch. The obsolete form (HIGH . LOW) is
2015also still accepted.
2008 2016
2009The optional ZONE is omitted or nil for Emacs local time, t for 2017The optional ZONE is omitted or nil for Emacs local time, t for
2010Universal Time, `wall' for system wall clock time, or a string as in 2018Universal Time, `wall' for system wall clock time, or a string as in
@@ -2127,7 +2135,8 @@ DEFUN ("decode-time", Fdecode_time, Sdecode_time, 0, 2, 0,
2127 doc: /* Decode a time value as (SEC MINUTE HOUR DAY MONTH YEAR DOW DST UTCOFF). 2135 doc: /* Decode a time value as (SEC MINUTE HOUR DAY MONTH YEAR DOW DST UTCOFF).
2128The optional SPECIFIED-TIME should be a list of (HIGH LOW . IGNORED), 2136The optional SPECIFIED-TIME should be a list of (HIGH LOW . IGNORED),
2129as from `current-time' and `file-attributes', or nil to use the 2137as from `current-time' and `file-attributes', or nil to use the
2130current time. The obsolete form (HIGH . LOW) is also still accepted. 2138current time. It can also be a single integer number of seconds since
2139the epoch. The obsolete form (HIGH . LOW) is also still accepted.
2131 2140
2132The optional ZONE is omitted or nil for Emacs local time, t for 2141The optional ZONE is omitted or nil for Emacs local time, t for
2133Universal Time, `wall' for system wall clock time, or a string as in 2142Universal Time, `wall' for system wall clock time, or a string as in
@@ -2253,8 +2262,9 @@ which provide a much more powerful and general facility.
2253If SPECIFIED-TIME is given, it is a time to format instead of the 2262If SPECIFIED-TIME is given, it is a time to format instead of the
2254current time. The argument should have the form (HIGH LOW . IGNORED). 2263current time. The argument should have the form (HIGH LOW . IGNORED).
2255Thus, you can use times obtained from `current-time' and from 2264Thus, you can use times obtained from `current-time' and from
2256`file-attributes'. SPECIFIED-TIME can also have the form (HIGH . LOW), 2265`file-attributes'. SPECIFIED-TIME can also be a single integer number
2257but this is considered obsolete. 2266of seconds since the epoch. The obsolete form (HIGH . LOW) is also
2267still accepted.
2258 2268
2259The optional ZONE is omitted or nil for Emacs local time, t for 2269The optional ZONE is omitted or nil for Emacs local time, t for
2260Universal Time, `wall' for system wall clock time, or a string as in 2270Universal Time, `wall' for system wall clock time, or a string as in
@@ -2334,8 +2344,9 @@ NAME is a string giving the name of the time zone.
2334If SPECIFIED-TIME is given, the time zone offset is determined from it 2344If SPECIFIED-TIME is given, the time zone offset is determined from it
2335instead of using the current time. The argument should have the form 2345instead of using the current time. The argument should have the form
2336\(HIGH LOW . IGNORED). Thus, you can use times obtained from 2346\(HIGH LOW . IGNORED). Thus, you can use times obtained from
2337`current-time' and from `file-attributes'. SPECIFIED-TIME can also 2347`current-time' and from `file-attributes'. SPECIFIED-TIME can also be
2338have the form (HIGH . LOW), but this is considered obsolete. 2348a single integer number of seconds since the epoch. The obsolete form
2349(HIGH . LOW) is also still accepted.
2339 2350
2340The optional ZONE is omitted or nil for Emacs local time, t for 2351The optional ZONE is omitted or nil for Emacs local time, t for
2341Universal Time, `wall' for system wall clock time, or a string as in 2352Universal Time, `wall' for system wall clock time, or a string as in