aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggert2018-09-28 10:32:41 -0700
committerPaul Eggert2018-09-28 10:37:53 -0700
commit857c2c271080ef62e57128f531cee6e974ca28fb (patch)
treecd5855c98bb8b5f18c462add82b5e2e44980a464
parent6aa93b45af9fb3631fb8fb6a04407db4d9a74107 (diff)
downloademacs-857c2c271080ef62e57128f531cee6e974ca28fb.tar.gz
emacs-857c2c271080ef62e57128f531cee6e974ca28fb.zip
Rename time-equal to time-equal-p
This is for consistency with time-less-p. * doc/lispref/os.texi (Time Calculations), etc/NEWS: * src/editfns.c (Ftime_equal_p, syms_of_editfns): * test/lisp/emacs-lisp/timer-tests.el (timer-test-multiple-of-time): Rename.
-rw-r--r--doc/lispref/os.texi2
-rw-r--r--etc/NEWS2
-rw-r--r--src/editfns.c4
-rw-r--r--test/lisp/emacs-lisp/timer-tests.el2
4 files changed, 5 insertions, 5 deletions
diff --git a/doc/lispref/os.texi b/doc/lispref/os.texi
index 400e6bb45c0..8ce5a5ed6d8 100644
--- a/doc/lispref/os.texi
+++ b/doc/lispref/os.texi
@@ -1739,7 +1739,7 @@ This returns @code{t} if time value @var{t1} is less than time value
1739The result is @code{nil} if either argument is a NaN. 1739The result is @code{nil} if either argument is a NaN.
1740@end defun 1740@end defun
1741 1741
1742@defun time-equal t1 t2 1742@defun time-equal-p t1 t2
1743This returns @code{t} if @var{t1} and @var{t2} are equal time values. 1743This returns @code{t} if @var{t1} and @var{t2} are equal time values.
1744The result is @code{nil} if either argument is a NaN. 1744The result is @code{nil} if either argument is a NaN.
1745@end defun 1745@end defun
diff --git a/etc/NEWS b/etc/NEWS
index 4dd4260b29e..e6508eb60bb 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -957,7 +957,7 @@ infinities and NaNs too, and propagate them or return nil like
957floating-point operators do. 957floating-point operators do.
958 958
959+++ 959+++
960** New function 'time-equal' compares time values for equality. 960** New function 'time-equal-p' compares time values for equality.
961 961
962** define-minor-mode automatically documents the meaning of ARG. 962** define-minor-mode automatically documents the meaning of ARG.
963 963
diff --git a/src/editfns.c b/src/editfns.c
index acd80bbf311..daea7463871 100644
--- a/src/editfns.c
+++ b/src/editfns.c
@@ -1676,7 +1676,7 @@ See `current-time-string' for the various forms of a time value. */)
1676 return time_cmp (t1, t2) < 0 ? Qt : Qnil; 1676 return time_cmp (t1, t2) < 0 ? Qt : Qnil;
1677} 1677}
1678 1678
1679DEFUN ("time-equal", Ftime_equal, Stime_equal, 2, 2, 0, 1679DEFUN ("time-equal-p", Ftime_equal_p, Stime_equal_p, 2, 2, 0,
1680 doc: /* Return non-nil if T1 and T2 are equal time values. */) 1680 doc: /* Return non-nil if T1 and T2 are equal time values. */)
1681 (Lisp_Object t1, Lisp_Object t2) 1681 (Lisp_Object t1, Lisp_Object t2)
1682{ 1682{
@@ -5765,7 +5765,7 @@ it to be non-nil. */);
5765 defsubr (&Scurrent_time); 5765 defsubr (&Scurrent_time);
5766 defsubr (&Stime_add); 5766 defsubr (&Stime_add);
5767 defsubr (&Stime_subtract); 5767 defsubr (&Stime_subtract);
5768 defsubr (&Stime_equal); 5768 defsubr (&Stime_equal_p);
5769 defsubr (&Stime_less_p); 5769 defsubr (&Stime_less_p);
5770 defsubr (&Sget_internal_run_time); 5770 defsubr (&Sget_internal_run_time);
5771 defsubr (&Sformat_time_string); 5771 defsubr (&Sformat_time_string);
diff --git a/test/lisp/emacs-lisp/timer-tests.el b/test/lisp/emacs-lisp/timer-tests.el
index 0e40cdf442f..c5971ee7687 100644
--- a/test/lisp/emacs-lisp/timer-tests.el
+++ b/test/lisp/emacs-lisp/timer-tests.el
@@ -40,7 +40,7 @@
40 (should (debug-timer-check)) t)) 40 (should (debug-timer-check)) t))
41 41
42(ert-deftest timer-test-multiple-of-time () 42(ert-deftest timer-test-multiple-of-time ()
43 (should (time-equal 43 (should (time-equal-p
44 (timer-next-integral-multiple-of-time '(0 0 0 1) (1+ (ash 1 53))) 44 (timer-next-integral-multiple-of-time '(0 0 0 1) (1+ (ash 1 53)))
45 (list (ash 1 (- 53 16)) 1)))) 45 (list (ash 1 (- 53 16)) 1))))
46 46