diff options
| author | Paul Eggert | 2016-11-19 14:43:25 -0800 |
|---|---|---|
| committer | Paul Eggert | 2016-11-19 14:43:25 -0800 |
| commit | 870c56a0bd8fe51baa2efa20a75b848f2bd27fd4 (patch) | |
| tree | 411a65a0f148e4df8ca1e43ce103c2d96badaccf /src | |
| parent | 6a03b47f81c5a8f44d7bc524fce93d6f63dc4d08 (diff) | |
| parent | 07f45d77816c947d90e1c56d489a6b32bdacdda0 (diff) | |
| download | emacs-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.c | 33 |
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 | ||
| 1611 | DEFUN ("time-add", Ftime_add, Stime_add, 2, 2, 0, | 1611 | DEFUN ("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. |
| 1613 | A nil value for either argument stands for the current time. | ||
| 1614 | See `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 | ||
| 1618 | DEFUN ("time-subtract", Ftime_subtract, Stime_subtract, 2, 2, 0, | 1620 | DEFUN ("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. |
| 1622 | Use `float-time' to convert the difference into elapsed seconds. | ||
| 1623 | A nil value for either argument stands for the current time. | ||
| 1624 | See `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 | ||
| 1625 | DEFUN ("time-less-p", Ftime_less_p, Stime_less_p, 2, 2, 0, | 1630 | DEFUN ("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. |
| 1632 | A nil value for either argument stands for the current time. | ||
| 1633 | See `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 | ||
| 2003 | DEFUN ("format-time-string", Fformat_time_string, Sformat_time_string, 1, 3, 0, | 2010 | DEFUN ("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. |
| 2005 | TIME is specified as (HIGH LOW USEC PSEC), as returned by | 2012 | TIME 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 |
| 2007 | is also still accepted. | 2014 | number of seconds since the epoch. The obsolete form (HIGH . LOW) is |
| 2015 | also still accepted. | ||
| 2008 | 2016 | ||
| 2009 | The optional ZONE is omitted or nil for Emacs local time, t for | 2017 | The optional ZONE is omitted or nil for Emacs local time, t for |
| 2010 | Universal Time, `wall' for system wall clock time, or a string as in | 2018 | Universal 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). |
| 2128 | The optional SPECIFIED-TIME should be a list of (HIGH LOW . IGNORED), | 2136 | The optional SPECIFIED-TIME should be a list of (HIGH LOW . IGNORED), |
| 2129 | as from `current-time' and `file-attributes', or nil to use the | 2137 | as from `current-time' and `file-attributes', or nil to use the |
| 2130 | current time. The obsolete form (HIGH . LOW) is also still accepted. | 2138 | current time. It can also be a single integer number of seconds since |
| 2139 | the epoch. The obsolete form (HIGH . LOW) is also still accepted. | ||
| 2131 | 2140 | ||
| 2132 | The optional ZONE is omitted or nil for Emacs local time, t for | 2141 | The optional ZONE is omitted or nil for Emacs local time, t for |
| 2133 | Universal Time, `wall' for system wall clock time, or a string as in | 2142 | Universal 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. | |||
| 2253 | If SPECIFIED-TIME is given, it is a time to format instead of the | 2262 | If SPECIFIED-TIME is given, it is a time to format instead of the |
| 2254 | current time. The argument should have the form (HIGH LOW . IGNORED). | 2263 | current time. The argument should have the form (HIGH LOW . IGNORED). |
| 2255 | Thus, you can use times obtained from `current-time' and from | 2264 | Thus, 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 |
| 2257 | but this is considered obsolete. | 2266 | of seconds since the epoch. The obsolete form (HIGH . LOW) is also |
| 2267 | still accepted. | ||
| 2258 | 2268 | ||
| 2259 | The optional ZONE is omitted or nil for Emacs local time, t for | 2269 | The optional ZONE is omitted or nil for Emacs local time, t for |
| 2260 | Universal Time, `wall' for system wall clock time, or a string as in | 2270 | Universal 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. | |||
| 2334 | If SPECIFIED-TIME is given, the time zone offset is determined from it | 2344 | If SPECIFIED-TIME is given, the time zone offset is determined from it |
| 2335 | instead of using the current time. The argument should have the form | 2345 | instead 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 |
| 2338 | have the form (HIGH . LOW), but this is considered obsolete. | 2348 | a single integer number of seconds since the epoch. The obsolete form |
| 2349 | (HIGH . LOW) is also still accepted. | ||
| 2339 | 2350 | ||
| 2340 | The optional ZONE is omitted or nil for Emacs local time, t for | 2351 | The optional ZONE is omitted or nil for Emacs local time, t for |
| 2341 | Universal Time, `wall' for system wall clock time, or a string as in | 2352 | Universal Time, `wall' for system wall clock time, or a string as in |