Re: current-time-list now defaults to nil in Emacs master
Eli Zaretskii <[email protected]>
| Newsgroups | gmane.emacs.devel |
|---|---|
| Message-ID | <[email protected]> |
> Date: Fri, 14 Aug 2026 13:11:41 +0530 > From: Madhu via "Emacs development discussions." <[email protected]> > > > * Stefan Monnier via "Emacs development discussions." <[email protected]> : > Wrote on Tue, 28 Jul 2026 11:54:05 -0400: > >> So should I dynamically bind current-time-list around calls to > >> current-time in these old packages? > > > > The better alternative (beside adjust the code so it works with the new > > format) is to insert a call to `time-convert`, as suggested in the > > `current-time` docstring. > > Some comments for the (my own) record > > I spotted a difference (in "legacy code"), though it probably makes no > difference to code which didnt check for endp cddr > > (setq current-time-list nil) > > (setq $a "Fri Aug 14 12:51:33 2026 +0530") > (let ((current-time-list t)) (encode-time (parse-time-string $a))) > ; (27262 49661) > > (time-convert (encode-time (parse-time-string $a)) 'list) > ;(27262 49661 0 0) > > > Another possible point of tripping is the interpretation of FORM in > time-convert vs the interpretetaion of FORM in decode-time and > parse-time-string Stefan, any comments?