From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Michael Heerdegen <michael_heerdegen@web.de>
Cc: 57397@debbugs.gnu.org, Lars Ingebrigtsen <larsi@gnus.org>
Subject: bug#57397: cl-letf blindly macroexpands places
Date: Thu, 25 Aug 2022 15:33:45 -0400 [thread overview]
Message-ID: <jwva67s2kd6.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <877d2xdjdi.fsf@web.de> (Michael Heerdegen's message of "Thu, 25 Aug 2022 06:42:17 +0200")
> to support symbol macros better:
>
> #+begin_src emacs-lisp
> (defun cl--letf (bindings simplebinds binds body)
> ;; It's not quite clear what the semantics of cl-letf should be...10..
> (if (null bindings)
> (if (and (null binds) (null simplebinds)) (macroexp-progn body)..20..)
> (let* ((binding (car bindings))
> (place (macroexpand (car binding) macroexpand-all-environment)));<--!!
> (gv-letplace (getter setter) place..12..))))
> #+end_src
>
> I think this is an error in the general case. It's at least always
> wrong when (car PLACE) is a macro name with a gv spec defined.
Indeed, defining a gv spec for a macro is fiddly.
> 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.
But regardless of this, we should probably turn `gv-synthetic-place`
into a function so it's more robust.
Stefan
next prev parent reply other threads:[~2022-08-25 19:33 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-25 4:42 bug#57397: 29.0.50; cl-letf blindly macroexpands places Michael Heerdegen
2022-08-25 19:33 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2022-08-27 1:43 ` bug#57397: " Michael Heerdegen
2022-08-27 14:48 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-08-31 1:32 ` Michael Heerdegen
2022-09-04 2:55 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-09-28 15:44 ` Michael Heerdegen
2022-09-28 16:29 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-09-28 16:52 ` Eli Zaretskii
2022-09-28 17:10 ` Michael Heerdegen
2022-09-28 17:12 ` Lars Ingebrigtsen
2022-09-28 17:15 ` Eli Zaretskii
2022-09-28 17:56 ` Michael Heerdegen
2022-09-28 18:15 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-10-02 18:18 ` bug#57397: 29.0.50; " Michael Heerdegen
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=jwva67s2kd6.fsf-monnier+emacs@gnu.org \
--to=bug-gnu-emacs@gnu.org \
--cc=57397@debbugs.gnu.org \
--cc=larsi@gnus.org \
--cc=michael_heerdegen@web.de \
--cc=monnier@iro.umontreal.ca \
/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.