From: Paul Eggert Date: Sat, 17 Aug 2019 09:21:25 +0000 (-0700) Subject: Have time-add etc. respect CURRENT_TIME_LIST too X-Git-Tag: emacs-27.0.90~1587^2 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=743cc86a053d536a4bfe8d519840c0b4cc2ce02e;p=emacs.git Have time-add etc. respect CURRENT_TIME_LIST too * src/timefns.c (time_arith) [!CURRENT_TIME_LIST]: Don’t generate a list, since CURRENT_TIME_LIST is false. --- diff --git a/src/timefns.c b/src/timefns.c index 16c39c83493..bf49843aae7 100644 --- a/src/timefns.c +++ b/src/timefns.c @@ -1090,11 +1090,14 @@ time_arith (Lisp_Object a, Lisp_Object b, bool subtract) } /* Return an integer if the timestamp resolution is 1, - otherwise the (TICKS . HZ) form if either argument is that way, - otherwise the (HI LO US PS) form for backward compatibility. */ + otherwise the (TICKS . HZ) form if !CURRENT_TIME_LIST or if + either input form supports timestamps that cannot be expressed + exactly in (HI LO US PS) form, otherwise the (HI LO US PS) form + for backward compatibility. */ return (EQ (hz, make_fixnum (1)) ? ticks - : timeform_sub_ps_p (aform) || timeform_sub_ps_p (bform) + : (!CURRENT_TIME_LIST + || timeform_sub_ps_p (aform) || timeform_sub_ps_p (bform)) ? Fcons (ticks, hz) : ticks_hz_list4 (ticks, hz)); }