GNU bug report logs -
#57397
29.0.50; cl-letf blindly macroexpands places
Previous Next
Reported by: Michael Heerdegen <michael_heerdegen <at> web.de>
Date: Thu, 25 Aug 2022 04:43:02 UTC
Severity: normal
Found in version 29.0.50
Fixed in version 29.1
Done: Michael Heerdegen <michael_heerdegen <at> web.de>
Bug is archived. No further changes may be made.
Full log
Message #14 received at 57397 <at> debbugs.gnu.org (full text, mbox):
>> > Maybe it's enough to expand only symbol macros?
>> Yes, that should still cover the original need in bug#26073 without
>> breaking your use case.
> Was it necessary to really expand symbol macros to fix that bug, or is
> the purpose only to handle the following `symbolp' test correctly?
No the problem shows up in the `gv-letplace` that follows immediately,
so by the time we get to the `symbolp` test it's too late.
But I suspect that the better fix is to skip the macroexpand call here
and to change `gv-get` so as to do a `macroexpand-1` call even if its
arg is a `symbolp`.
>> But regardless of this, we should probably turn `gv-synthetic-place`
>> into a function so it's more robust.
> Why is it a macro?
Beats me.
I tried to ask the original author but he was not available for comments.
> Seems to work quite as well (using the same body and
> gv-spec) when defined as a function.
The only downside is that the code is less efficient (the getter has to
construct the closure of the setter, then call `gv-synthetic-place`
which then just throws it away) but that should be easy to fix with
a compiler macro.
Stefan
This bug report was last modified 2 years and 290 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.