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
Message #23 received at 65344 <at> debbugs.gnu.org (full text, mbox):
Gerd Möllmann <gerd.moellmann <at> gmail.com> writes:
> Not remembering much about Edebug, but cl-defun seems to work with
> Edebug. So... :-)
Yes, this problem does not concern `cl-defun'. This is the Edebug spec
of `cl-flet':
#+begin_src emacs-lisp
((&rest [&or (symbolp form)
(&define [&name symbolp "@cl-flet@"]
[&name [] gensym] ;Make it unique!
cl-lambda-list
cl-declarations-or-string
[&optional ("interactive" interactive)]
def-body)])
cl-declarations body)
#+end_src
Instrumenting a binding first tries (symbolp form): This is the syntax
where you can specify an expression to evaluate whose result is then
fbound. Although we obviously have three elements to match in the
recipe case, Edebug tries nonetheless, and FORM raises an error because
it can't match ((min max)). It should just cause backtracking, but the
implementation disables backtracking by purpose.
When you replace (symbolp form) with (symbolp sexp) the problem is gone.
But that only silences the problem: this also disables the
instrumentation of a form in that position.
I'm too dumb to fix this correctly. We could transpose the two &or
branches in the spec, this works but it is also only a way to avoid the
problem.
Michael.
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.