Subject: Re: bug#54190: 29.0.50; [PATCH] Incorrect/missing documentation for some Eshell "$" syntaxes

From: Lars Ingebrigtsen <[email-masked]>
Date: Mon, 28 Feb 2022 10:38:31 +0100

Jim Porter <[email-masked]> writes:

> Ok, the breaking commit is b03f74e0f2a578b1580e8b1c368665850ee7f808
> ("Don't quote lambdas in several places"). Reverting the change in
> that commit in lisp/eshell/esh-var.el fixes things, although I'm not
> sure why yet. I believe that code gets evaluated by `eshell-do-eval',
> which evaluates things in a very particular way in order to support
> deferring evaluation at various points. Once I'm sure I understand why
> this is breaking, I'll post a patch to fix the bustage.

It's this bit?  Hm...

diff --git a/lisp/eshell/esh-var.el b/lisp/eshell/esh-var.el
index 96838d4132..7388279f15 100644
--- a/lisp/eshell/esh-var.el
+++ b/lisp/eshell/esh-var.el
@@ -463,8 +463,8 @@ eshell-parse-variable-ref
                    (eshell-as-subcommand ,(eshell-parse-command cmd))
                    (ignore
                     (nconc eshell-this-command-hook
-                           (list (function (lambda ()
-                                              (delete-file ,temp))))))
+                           (list (lambda ()
+                                   (delete-file ,temp)))))
                    (quote ,temp)))
             (goto-char (1+ end)))))))
    ((eq (char-after) ?\()

Trying to follow the logic of how this is eventually evaluated isn't,
er, obvious, but I'm not sure how that change could break anything,
either.  Perhaps Stefan has a comment; added to the CCs.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no