From: Michael Heerdegen <michael_heerdegen@web.de>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: 57397@debbugs.gnu.org, Lars Ingebrigtsen <larsi@gnus.org>
Subject: bug#57397: cl-letf blindly macroexpands places
Date: Wed, 28 Sep 2022 17:44:14 +0200 [thread overview]
Message-ID: <87tu4rbj1t.fsf@web.de> (raw)
In-Reply-To: <jwvo7vvx3rg.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Sat, 03 Sep 2022 22:55:53 -0400")
Stefan Monnier <monnier@iro.umontreal.ca> writes:
> diff --git a/doc/lispref/functions.texi b/doc/lispref/functions.texi
> index 983dfe2ec59..8e34fdf3640 100644
> --- a/doc/lispref/functions.texi
> +++ b/doc/lispref/functions.texi
> @@ -2476,11 +2476,11 @@ Declare Form
> expander will call @var{expander} with that form as well as with
> @var{args}@dots{}, and @var{expander} can either return a new expression to use
> instead of the function call, or it can return just the form unchanged,
> -to indicate that the function call should be left alone. @var{expander} can
> -be a symbol, or it can be a form @code{(lambda (@var{arg}) @var{body})} in
> -which case @var{arg} will hold the original function call expression, and the
> -(unevaluated) arguments to the function can be accessed using the function's
> -formal arguments.
> +to indicate that the function call should be left alone.
> +
> +To avoid syntactic redundancy, when @var{expander} is of the form
> +@code{(lambda (@var{arg}) @var{body})} the function's formal arguments
> +are automatically added to the lambda's list of arguments.
Yes, that would have helped a lot. A definitive improvement.
But could we maybe describe that simpler like "when expander is a lambda
form [...]"? - Because AFAIU these arguments are added to _any_
argument list - with other words, implicitly hint that it's an error to
specify function arguments in the lambda arglist explicitly, or to
provide an empty arglist.
Michael.
next prev parent reply other threads:[~2022-09-28 15:44 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 ` bug#57397: " Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-08-27 1:43 ` 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 [this message]
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=87tu4rbj1t.fsf@web.de \
--to=michael_heerdegen@web.de \
--cc=57397@debbugs.gnu.org \
--cc=larsi@gnus.org \
--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.