Commit e7cf5e4
committed
fix(lisp): Don't assume a list representation in `eask-current-time'
`eask-current-time' rebuilt a seconds count from the first two elements
of `current-time'. That representation is not guaranteed: it depends on
`current-time-list', which defaults to nil as of Emacs 32, so
`current-time' returns a (TICKS . HZ) cons cell rather than a
(HIGH LOW USEC PSEC) list.
`(cadr now)' then evaluates `(car 1000000000)', and `eask package' aborts
with "Wrong type argument: listp, 1000000000", where the number is the HZ
value from the cons cell.
Use `float-time', which accepts either representation and is available in
every Emacs version Eask supports (the declared floor is 26.1, so
`time-convert' is not an option). The result is unchanged for the list
representation.
Fixes #431.1 parent e777d75 commit e7cf5e4
1 file changed
Lines changed: 6 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
311 | 311 | | |
312 | 312 | | |
313 | 313 | | |
314 | | - | |
315 | | - | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
316 | 320 | | |
317 | 321 | | |
318 | 322 | | |
| |||
0 commit comments