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

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

bug#35546: 27.0.50; setf return value for new alist entries is wrong


From: Michael Heerdegen
Subject: bug#35546: 27.0.50; setf return value for new alist entries is wrong
Date: Tue, 07 May 2019 15:43:28 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Michael Heerdegen <michael_heerdegen@web.de> writes:

> Tassilo Horn <tsdh@gnu.org> writes:
>
> > According to the last sentence, I'd assume that
> >
> >   (setq my-alist nil)
> >   (setf (alist-get 'foo my-alist) "foo-value")
> >
> > would return "foo-value", but infact it returns ((foo . "foo-value")).

I quickly looked if there are any more such cases in gv.el.  I found
'cons' and 'logand'.  While 'cons' also seems easy to fix, I'm
struggling with 'logand', because I don't understand what it is doing.
Not only that "it should arguably fail when trying to set a value
outside of the mask" as described in the file header, I also don't see
how the used formula makes more sense than setting the place to just V.


Michael.





reply via email to

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