diff options
| author | Paul Eggert | 2019-08-17 02:21:25 -0700 |
|---|---|---|
| committer | Paul Eggert | 2019-08-17 02:21:53 -0700 |
| commit | 743cc86a053d536a4bfe8d519840c0b4cc2ce02e (patch) | |
| tree | c80ca1158889367acd8dd240023acf0c52e41969 /src | |
| parent | 37257d6acadff17bd1e52cfa460950bcb684c5c3 (diff) | |
| download | emacs-743cc86a053d536a4bfe8d519840c0b4cc2ce02e.tar.gz emacs-743cc86a053d536a4bfe8d519840c0b4cc2ce02e.zip | |
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.
Diffstat (limited to 'src')
| -rw-r--r-- | src/timefns.c | 9 |
1 files changed, 6 insertions, 3 deletions
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) | |||
| 1090 | } | 1090 | } |
| 1091 | 1091 | ||
| 1092 | /* Return an integer if the timestamp resolution is 1, | 1092 | /* Return an integer if the timestamp resolution is 1, |
| 1093 | otherwise the (TICKS . HZ) form if either argument is that way, | 1093 | otherwise the (TICKS . HZ) form if !CURRENT_TIME_LIST or if |
| 1094 | otherwise the (HI LO US PS) form for backward compatibility. */ | 1094 | either input form supports timestamps that cannot be expressed |
| 1095 | exactly in (HI LO US PS) form, otherwise the (HI LO US PS) form | ||
| 1096 | for backward compatibility. */ | ||
| 1095 | return (EQ (hz, make_fixnum (1)) | 1097 | return (EQ (hz, make_fixnum (1)) |
| 1096 | ? ticks | 1098 | ? ticks |
| 1097 | : timeform_sub_ps_p (aform) || timeform_sub_ps_p (bform) | 1099 | : (!CURRENT_TIME_LIST |
| 1100 | || timeform_sub_ps_p (aform) || timeform_sub_ps_p (bform)) | ||
| 1098 | ? Fcons (ticks, hz) | 1101 | ? Fcons (ticks, hz) |
| 1099 | : ticks_hz_list4 (ticks, hz)); | 1102 | : ticks_hz_list4 (ticks, hz)); |
| 1100 | } | 1103 | } |