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

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

Re: plist-put: destructive?


From: Stefan Monnier
Subject: Re: plist-put: destructive?
Date: Fri, 20 Jan 2017 22:25:27 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux)

> So what's the ambiguity? Are there circumstances where a simple
> plist-put isn't going to modify the original plist?

Yes, when the plist is empty.
BTW, in recent Emacsen, you can use

    (setf (alist-get K AL) V)

and it works even when the alist is nil (but it requires AL to be
a valid *place* rather than an arbitrary expression).  You could make
something similar for plist-get.


        Stefan




reply via email to

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