[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#37943: assoc-default is wrongly flagged as side-effect-free.
From: |
Stefan Kangas |
Subject: |
bug#37943: assoc-default is wrongly flagged as side-effect-free. |
Date: |
Tue, 25 Aug 2020 16:32:45 -0700 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
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.
- bug#37943: assoc-default is wrongly flagged as side-effect-free.,
Stefan Kangas <=