GNU bug report logs -
#65344
28.2; Unable to Edebug cl-flet form which uses argument destructuring
Previous Next
Reported by: Brandon Irizarry <brandon.irizarry <at> gmail.com>
Date: Wed, 16 Aug 2023 18:23:02 UTC
Severity: normal
Found in version 28.2
Fixed in version 30.1
Done: Gerd Möllmann <gerd.moellmann <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
> From the CL-Lib manual, 4.3.2 (Function Bindings):
>
> Functions defined by ‘cl-flet’ may use the full Common Lisp
> argument notation supported by ‘cl-defun’; also, the function body
> is enclosed in an implicit block as if by ‘cl-defun’. *Note
> Program Structure::.
>
> Following the reference to Chapter 2, and heading into 2.1 (Argument
> Lists):
>
> Argument lists support “destructuring”. In Common Lisp,
> destructuring is only allowed with ‘defmacro’; this package allows it
> with ‘cl-defun’ and other argument lists as well.
>
> That is, while 'defun' doesn't support this, 'cl-defun' (and, by extension,
> 'cl-flet') does.
Wow, that's nicely hidden. Thanks for digging that out! I would like to
nominate this for the obscure feature of the week award.
@Eli:
I can see that implemented in cl--do-arglist, which calls itself
recursively for such lists like in our case used as function parameters.
cl--do-arglist is used (indirectly) by cl-flet, cl-labels, cl-defun,
maybe others.
cl-defun's doc string even contains has hint
"...The full form of a Common Lisp function argument list is
...
VAR may be replaced recursively with an argument list for
destructuring,,,"
I don't think cl-flet/cl-labels have that.
@Michael:
Not remembering much about Edebug, but cl-defun seems to work with
Edebug. So... :-)
This bug report was last modified 1 year and 261 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.