Subject: Re: bug#73880: Master: emacs-lisp-mode: Tab completion for a function position fails in a `let' form.

From: Alan Mackenzie <[email-masked]>
Date: Mon, 28 Oct 2024 11:19:09 +0000

Hello, Dmitry.

On Sun, Oct 27, 2024 at 03:29:08 +0200, Dmitry Gutov wrote:
> On 27/10/2024 01:09, Alan Mackenzie wrote:
> >> BTW, I had to move the corresponding piece of code to a separate
> >> function to debug it. Too bad edebug doesn't know how to jump into the
> >> 'guard' clauses.
> > I found the bug in pcase.el causing this.  The edebug spec element
> > &interpose, which is used in pcase-PAT absolutely requires that the
> > function it uses (in this case pcase--edebug-match-pat-args) must call
> > PF.  (See edebug.el around L1810.)

> > What PF (internal function in edebug) does is join up edebug specs with
> > what follows.

> > pcase--edebug-match-pat-args fails to do this for most cases it deals
> > with, including guard.  As a result, there is no edebug instrumentation
> > generated for the argument of guard.

> > I'm going to raise a bug report for this (answering my question in my
> > last post).  In the meantime, here is a rough first draught of a fix.
> > With it, I can debug the guard clauses in elisp-completion-at-point,
> > though I seem to be triggering other problems (I get a message about a
> > `_' argument being used after all).

> Nice! It works, thank you.

Thanks for testing it.  I've now submitted bug#74052, complete with a
patch, for this problem.

[ 74052 is easy to remember - it's 66^2 * 17 :-]

-- 
Alan Mackenzie (Nuremberg, Germany).