bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#50214: 28.0.50; cl-struct changes may affect user packages in the wi


From: Lars Ingebrigtsen
Subject: bug#50214: 28.0.50; cl-struct changes may affect user packages in the wild
Date: Mon, 22 Aug 2022 16:35:30 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Philipp <p.stephani2@gmail.com> writes:

>> Unfortunately, I know of no other way to implement what ts.el does
>> without modifying the accessors, which requires accessing the internal
>> struct details after it is defined.
>
> I haven't checked the code in detail, but AIUI ts.el tries to initialize 
> structure members lazily?  Why not just use a wrapper function for that?
>
> (defun ts-hour (ts)
>   (or (ts--hour ts)
>       (setf (ts--hour ts) (string-to-number (format-time-string "%H" (ts-unix 
> ts)))))
>
> Here ts--hour is the actual accessor, which is private and shouldn't be used 
> outside of ts.el.

Adam, does this suggestion work for you?





reply via email to

[Prev in Thread] Current Thread [Next in Thread]