On 2/28/2022 5:18 AM, Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors wrote: > Lars Ingebrigtsen [2022-02-28 10:38:31] wrote: >> Jim Porter writes: >>> Ok, the breaking commit is b03f74e0f2a578b1580e8b1c368665850ee7f808 >>> ("Don't quote lambdas in several places"). [snip]> Looks like a bug somewhere in the `eshell-do-eval` machinery, yes. > Until we find the problem (or rewrite `eshell-do-eval` on top of the CPS > converter of `generator.el`), I think reverting this change (and adding > a comment pointing to this bug) sounds like a great plan. Here's a patch to fix this, with a test so it doesn't regress again. I also re-attached the doc fix for simplicity. Both should apply to the 28 branch with no issues. I'll try to figure out why `eshell-do-eval' expects quoted lambdas, but unless that's a really trivial problem, the method here is probably safer for the 28 branch. Besides, I'm now 4 or 5 steps removed from the patch I was *trying* to work on, so a quick fix here will help me get back on track. Longer term, I agree that rewriting `eshell-do-eval' in terms of generator.el would be good. I think there are some bugs with how local variable state is managed by `eshell-do-eval', but I haven't had a chance to investigate it in any detail yet.