unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Michael Heerdegen <michael_heerdegen@web.de>
To: Tassilo Horn <tsdh@gnu.org>
Cc: 35546@debbugs.gnu.org
Subject: bug#35546: 27.0.50; setf return value for new alist entries is wrong
Date: Tue, 07 May 2019 15:43:28 +0200	[thread overview]
Message-ID: <878svimlbz.fsf@web.de> (raw)
In-Reply-To: <87ftpqmrz9.fsf@web.de> (Michael Heerdegen's message of "Tue, 07 May 2019 13:19:54 +0200")

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	other threads:[~2019-05-07 13:43 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-03 13:49 bug#35546: 27.0.50; setf return value for new alist entries is wrong Tassilo Horn
2019-05-07 11:19 ` Michael Heerdegen
2019-05-07 13:43   ` Michael Heerdegen [this message]
2019-05-07 14:58     ` npostavs
2019-05-07 15:56       ` Michael Heerdegen
2019-05-07 16:50         ` npostavs
2020-04-12 12:26           ` Štěpán Němec
2020-04-12 12:34             ` Noam Postavsky
2020-04-12 12:47               ` Štěpán Němec
2020-04-13  1:01                 ` Michael Heerdegen
2020-08-19 10:34                   ` Lars Ingebrigtsen
2020-08-25 16:16                     ` Štěpán Němec

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=878svimlbz.fsf@web.de \
    --to=michael_heerdegen@web.de \
    --cc=35546@debbugs.gnu.org \
    --cc=tsdh@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).