Subject: bug#61179: lambda inside interactive form of around advice isn't a closure

From: Stefan Monnier <[email-masked]>
Date: Sun, 05 Feb 2023 09:05:29 -0500

> | Compiling internal form(s) at Sun Feb  5 00:36:11 2023
> | int-lambda.elc: Error: ‘lambda’ defined after use in (lambda (old-spec3)
> | (let ((test-result0 (#[0 "\300\207" [t] 1]))) (cons (if test-result0
> | 'mel-ad-run-replacement 'mel-ad-run-original)
> | (advice-eval-interactive-spec (if (not test-result0) old-spec3)))))
> | (missing ‘require’ of a library file?)
> | int-lambda.elc: Error: ‘lambda’ used as function name is invalid
>
> Who is to blame?

You, of course.
But I think the patch below (which I just pushed to `master`) will help,

        Stefan

diff --git a/lisp/emacs-lisp/cconv.el b/lisp/emacs-lisp/cconv.el
index e4268c2fb88..e8d639903c1 100644
--- a/lisp/emacs-lisp/cconv.el
+++ b/lisp/emacs-lisp/cconv.el
@@ -488,7 +488,7 @@ cconv-convert
             (_ (pcase cif
                  ('nil nil)
                  (`#',f
-                  (setf (cadr (car bf)) (if wrapped (nth 2 f) f))
+                  (setf (cadr (car bf)) (if wrapped (nth 2 f) cif))
                   (setq cif nil))
                  ;; The interactive form needs special treatment, so the form
                  ;; inside the `interactive' won't be used any further.