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 | |
| 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
| -rw-r--r-- | admin/release-process | 9 | ||||
| -rw-r--r-- | doc/lispref/os.texi | 13 | ||||
| -rw-r--r-- | nt/README.W32 | 2 | ||||
| -rw-r--r-- | src/editfns.c | 33 |
4 files changed, 36 insertions, 21 deletions
diff --git a/admin/release-process b/admin/release-process index 28f2307846d..6aa004014b8 100644 --- a/admin/release-process +++ b/admin/release-process | |||
| @@ -46,13 +46,12 @@ See admin/gitmerge.el. | |||
| 46 | Emacs uses the "blocking" feature of Debbugs for bugs that need to be | 46 | Emacs uses the "blocking" feature of Debbugs for bugs that need to be |
| 47 | addressed in the next release. | 47 | addressed in the next release. |
| 48 | 48 | ||
| 49 | Currently, bug#19759 is the tracking bug for release of 25.1 and | 49 | Currently, bug#21966 is the tracking bug for release of 25.2 and |
| 50 | bug#21966 is the tracking bug for release of 25.2. Say bug#123 needs | 50 | bug#24655 is the tracking bug for release 26.1. Say bug#123 needs |
| 51 | bug#21966 is the tracking bug for the next release. Say bug#123 needs | 51 | to be fixed for Emacs 26.1. Send a message to control@debbugs.gnu.org |
| 52 | to be fixed for Emacs 25.1. Send a message to control@debbugs.gnu.org | ||
| 53 | that says: | 52 | that says: |
| 54 | 53 | ||
| 55 | block 19759 by 123 | 54 | block 24655 by 123 |
| 56 | 55 | ||
| 57 | Change "block" to "unblock" to remove a bug from the list. Closed | 56 | Change "block" to "unblock" to remove a bug from the list. Closed |
| 58 | bugs are not listed as blockers, so you do not need to explicitly | 57 | bugs are not listed as blockers, so you do not need to explicitly |
diff --git a/doc/lispref/os.texi b/doc/lispref/os.texi index 903bad3b9c5..616d1e7ab3a 100644 --- a/doc/lispref/os.texi +++ b/doc/lispref/os.texi | |||
| @@ -1474,7 +1474,7 @@ corresponding time value. | |||
| 1474 | @defun format-time-string format-string &optional time zone | 1474 | @defun format-time-string format-string &optional time zone |
| 1475 | 1475 | ||
| 1476 | This function converts @var{time} (or the current time, if | 1476 | This function converts @var{time} (or the current time, if |
| 1477 | @var{time} is omitted) to a string according to | 1477 | @var{time} is omitted or @code{nil}) to a string according to |
| 1478 | @var{format-string}. The conversion uses the time zone rule @var{zone}, which | 1478 | @var{format-string}. The conversion uses the time zone rule @var{zone}, which |
| 1479 | defaults to the current time zone rule. @xref{Time Zone Rules}. The argument | 1479 | defaults to the current time zone rule. @xref{Time Zone Rules}. The argument |
| 1480 | @var{format-string} may contain @samp{%}-sequences which say to | 1480 | @var{format-string} may contain @samp{%}-sequences which say to |
| @@ -1692,7 +1692,9 @@ interactively, it prints the duration in the echo area. | |||
| 1692 | @cindex calendrical computations | 1692 | @cindex calendrical computations |
| 1693 | 1693 | ||
| 1694 | These functions perform calendrical computations using time values | 1694 | These functions perform calendrical computations using time values |
| 1695 | (@pxref{Time of Day}). | 1695 | (@pxref{Time of Day}). A value of @code{nil} for any of their |
| 1696 | time-value arguments stands for the current system time, and a single | ||
| 1697 | integer number stands for the number of seconds since the epoch. | ||
| 1696 | 1698 | ||
| 1697 | @defun time-less-p t1 t2 | 1699 | @defun time-less-p t1 t2 |
| 1698 | This returns @code{t} if time value @var{t1} is less than time value | 1700 | This returns @code{t} if time value @var{t1} is less than time value |
| @@ -1701,12 +1703,15 @@ This returns @code{t} if time value @var{t1} is less than time value | |||
| 1701 | 1703 | ||
| 1702 | @defun time-subtract t1 t2 | 1704 | @defun time-subtract t1 t2 |
| 1703 | This returns the time difference @var{t1} @minus{} @var{t2} between | 1705 | This returns the time difference @var{t1} @minus{} @var{t2} between |
| 1704 | two time values, as a time value. | 1706 | two time values, as a time value. If you need the difference in units |
| 1707 | of elapsed seconds, use @code{float-time} (@pxref{Time of Day, | ||
| 1708 | float-time}) to convert the result into seconds. | ||
| 1705 | @end defun | 1709 | @end defun |
| 1706 | 1710 | ||
| 1707 | @defun time-add t1 t2 | 1711 | @defun time-add t1 t2 |
| 1708 | This returns the sum of two time values, as a time value. | 1712 | This returns the sum of two time values, as a time value. |
| 1709 | One argument should represent a time difference rather than a point in time. | 1713 | One argument should represent a time difference rather than a point in time, |
| 1714 | either as a list or as a single number of elapsed seconds. | ||
| 1710 | Here is how to add a number of seconds to a time value: | 1715 | Here is how to add a number of seconds to a time value: |
| 1711 | 1716 | ||
| 1712 | @example | 1717 | @example |
diff --git a/nt/README.W32 b/nt/README.W32 index b65a1de4eec..9bc8f87496e 100644 --- a/nt/README.W32 +++ b/nt/README.W32 | |||
| @@ -283,7 +283,7 @@ See the end of the file for license conditions. | |||
| 283 | To ask questions on this mailing list, send email to | 283 | To ask questions on this mailing list, send email to |
| 284 | help-gnu-emacs@gnu.org. | 284 | help-gnu-emacs@gnu.org. |
| 285 | 285 | ||
| 286 | A mailing list for issuesspecifically related to the MS-Windows port | 286 | A mailing list for issues specifically related to the MS-Windows port |
| 287 | of Emacs is here: | 287 | of Emacs is here: |
| 288 | 288 | ||
| 289 | http://lists.gnu.org/mailman/listinfo/help-emacs-windows | 289 | http://lists.gnu.org/mailman/listinfo/help-emacs-windows |
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 |