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

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

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


From: Lars Ingebrigtsen
Subject: bug#47425: 26.3; `plist-get', `plist-put' should accept a TEST function
Date: Tue, 28 Jun 2022 17:40:10 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

"Basil L. Contovounesios" <contovob@tcd.ie> writes:

> (let ((plist (list :a t)))
>   (setf (plist-get plist :a) nil)
>   plist)
> ;; => (:a nil)
>
> (let ((plist (list :a t)))
>   (setf (plist-get plist :a #'eq) nil)
>   plist)
> ;; error-> wrong-number-of-arguments
>
> Do we want the expander in gv.el to understand the new argument?

Yup.

> There's also the question of map.el.  Custom predicates are deprecated
> there, since they rely on knowing the underlying map type.  Do we want
> plist operations to understand custom predicates regardless?

Using the map functions for plists doesn't really work, so I don't think
it matters much.  That is, if you end up with a nil MAP after doing some
deletes, you suddenly can't put anything into the map.

I think expanding map.el to try to handle plists was a mistake -- it's a
fun hack, but can't be used meaningfully in practice.

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





reply via email to

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