Subject: bug#47425: 26.3; `plist-get', `plist-put' should accept a TEST function

From: Lars Ingebrigtsen <[email-masked]>
Date: Mon, 27 Jun 2022 12:22:59 +0200

Lars Ingebrigtsen <[email-masked]> writes:

>> I'm not a fan of this since it would mean that these functions will no
>> longer be side-effect-free.  Adding a function argument to a function
>> means that the function can no longer really promise anything, so it
>> leads to code that's harder to reason about.
>
> `plist-put' already mutates state (of the plist), so it's not
> side-effect-free...
>
> The other ones are, though.  But...  I'm not sure that's really much of
> a concern in practice.  (And Emacs should be able to reason about the
> function, still, if the predicate passed in is side effect free, but I
> guess we don't have the machinery for that in place?)

We don't.

Anyway, that was the only objection here, so I went ahead and made this
change in Emacs 29.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no