From 48387e827cd8d550e9627df7256fd3f1a9705a26 Mon Sep 17 00:00:00 2001 From: Jim Porter Date: Thu, 3 Mar 2022 21:46:11 -0800 Subject: [PATCH] Fix Eshell's '$' forms in a better way * lisp/eshell/esh-cmd.el (eshell-do-eval): Handle 'lambda' forms. * lisp/eshell/esh-var.el (eshell-parse-variable-ref): Remove workaround from commit 9e257ae (bug#54190). --- lisp/eshell/esh-cmd.el | 2 +- lisp/eshell/esh-var.el | 8 ++------ 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/lisp/eshell/esh-cmd.el b/lisp/eshell/esh-cmd.el index 04b54d9d79..484888ec47 100644 --- a/lisp/eshell/esh-cmd.el +++ b/lisp/eshell/esh-cmd.el @@ -1077,7 +1077,7 @@ eshell-do-eval (cond ((not (listp form)) (list 'quote (eval form))) - ((memq (car form) '(quote function)) + ((memq (car form) '(quote function lambda)) form) (t ;; skip past the call to `eshell-do-eval' diff --git a/lisp/eshell/esh-var.el b/lisp/eshell/esh-var.el index af89e35f55..092f9f87a4 100644 --- a/lisp/eshell/esh-var.el +++ b/lisp/eshell/esh-var.el @@ -458,12 +458,8 @@ eshell-parse-variable-ref (eshell-parse-command cmd))) (ignore (nconc eshell-this-command-hook - ;; Quote this lambda; it will be evaluated - ;; by `eshell-do-eval', which requires very - ;; particular forms in order to work - ;; properly. See bug#54190. - (list (function (lambda () - (delete-file ,temp)))))) + (list (lambda () + (delete-file ,temp))))) (quote ,temp))) (goto-char (1+ end))))))) ((eq (char-after) ?\() -- 2.25.1