GNU bug report logs - #57397
29.0.50; cl-letf blindly macroexpands places

Previous Next

Package: emacs;

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


View this message in rfc822 format

From: Michael Heerdegen <michael_heerdegen <at> web.de>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 57397 <at> debbugs.gnu.org, Lars Ingebrigtsen <larsi <at> gnus.org>
Subject: bug#57397: cl-letf blindly macroexpands places
Date: Wed, 28 Sep 2022 17:44:14 +0200
Stefan Monnier <monnier <at> 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.




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.