Subject: Re: bug#48585: 28.0.50; Missing Edebug instrumentation for some 'if-let' variants

From: Michael Heerdegen <[email-masked]>
Date: Sat, 16 Jul 2022 01:15:06 +0200

Philipp <[email-masked]> writes:

> Instrument the following definition using C-u C-M-x:
> (defun f (x) (if-let* (x) 1))
>
> Then, evaluate this form:
> (f 2)
>
> Edebug will step into 'f', but won't stop at 'x'.
>
> The problem lies in this part of the Edebug specification for 'if-let*':
>
> [&or symbolp (symbolp form) (form)]
>
> The 'symbolp' specification element causes Edebug to not instrument the
> 'x' symbol.  However, the 'symbolp' specification is also necessary
> here; we couldn't just replace it with 'form' because that would make
> the branches overlap.

Dunno how bad an overlap is.  I tried this:

(debug ((&rest [&or (symbolp form) (form) form])
                   body))

That lets instrumenting error:

| internal-macroexpand-for-load: Eager macro-expansion failure: (error
| "`let' bindings can have only one value-form" edebug-after 0 1 x)

Does that happen because `x` appears as binding _variable_ in the
expansion, and Ebebug messes with that?  Then we would have a second
problem.

Michael.