all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Kangas <stefan@marxist.se>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: Alan Mackenzie <acm@muc.de>, 37943@debbugs.gnu.org
Subject: bug#37943: assoc-default is wrongly flagged as side-effect-free.
Date: Tue, 25 Aug 2020 16:32:45 -0700	[thread overview]
Message-ID: <CADwFkm=0kPA==z_JrftGa7wNVULzu30xcZqedHChZCGr+m-_fQ@mail.gmail.com> (raw)
In-Reply-To: <87zhhk99lb.fsf@gnus.org> (Lars Ingebrigtsen's message of "Mon, 28 Oct 2019 16:24:32 +0100")

Lars Ingebrigtsen <larsi@gnus.org> writes:

> Alan Mackenzie <acm@muc.de> writes:
>
>> In the source for assoc-default (in subr.el) appears
>>
>>     (declare (side-effect-free t))
>>
>> .  This is not true when the TEST argument to assoc-default itself
>> changes the match-data.
>>
>> I suggest removing this declaration from the function rather than
>> amending the code with a save-match-data.  There are calls to
>> assoc-default in set-auto-mode where the caller relies on the match data
>> set by the function when TEST is string-match.  :-(
>
> Yeah, I don't think any function that takes a closure as an argument
> should be marked side-effect free?  The TEST function can side-effect as
> much as it wants.

No further replies within 43 weeks.

Should we just go ahead and remove it then?  No one seems to be
objecting.





  reply	other threads:[~2020-08-25 23:32 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-27 12:24 bug#37943: assoc-default is wrongly flagged as side-effect-free Alan Mackenzie
2019-10-28 15:24 ` Lars Ingebrigtsen
2020-08-25 23:32   ` Stefan Kangas [this message]
2020-08-26  9:28     ` Lars Ingebrigtsen

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

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

  git send-email \
    --in-reply-to='CADwFkm=0kPA==z_JrftGa7wNVULzu30xcZqedHChZCGr+m-_fQ@mail.gmail.com' \
    --to=stefan@marxist.se \
    --cc=37943@debbugs.gnu.org \
    --cc=acm@muc.de \
    --cc=larsi@gnus.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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.