diff options
| author | Paul Eggert | 2022-08-01 00:38:32 -0700 |
|---|---|---|
| committer | Paul Eggert | 2022-08-01 01:17:13 -0700 |
| commit | 9d4633e934da77bc1c3617a9450ee17151f35271 (patch) | |
| tree | 2f4cbe555e786d930ee7c8490fb4cb8012b6eea4 /src | |
| parent | 932c0bc1fc80a63fb4d6015c049592f3c228cc4f (diff) | |
| download | emacs-9d4633e934da77bc1c3617a9450ee17151f35271.tar.gz emacs-9d4633e934da77bc1c3617a9450ee17151f35271.zip | |
(time-equal-p nil X) returns nil
* src/timefns.c (Ftime_equal_p): nil compares unequal to non-nil.
Diffstat (limited to 'src')
| -rw-r--r-- | src/timefns.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/timefns.c b/src/timefns.c index 9df50eaecc3..25bfda513c2 100644 --- a/src/timefns.c +++ b/src/timefns.c | |||
| @@ -1258,7 +1258,9 @@ DEFUN ("time-equal-p", Ftime_equal_p, Stime_equal_p, 2, 2, 0, | |||
| 1258 | See `format-time-string' for the various forms of a time value. */) | 1258 | See `format-time-string' for the various forms of a time value. */) |
| 1259 | (Lisp_Object a, Lisp_Object b) | 1259 | (Lisp_Object a, Lisp_Object b) |
| 1260 | { | 1260 | { |
| 1261 | return time_cmp (a, b) == 0 ? Qt : Qnil; | 1261 | /* A nil arg compares unequal to a non-nil arg. This also saves the |
| 1262 | expense of current_timespec if either arg is nil. */ | ||
| 1263 | return NILP (a) == NILP (b) && time_cmp (a, b) == 0 ? Qt : Qnil; | ||
| 1262 | } | 1264 | } |
| 1263 | 1265 | ||
| 1264 | 1266 | ||