From ae983e92838d47f2a42662270b6b23e37eb330a2 Mon Sep 17 00:00:00 2001 From: Jim Porter Date: Sun, 17 Sep 2023 11:22:19 -0700 Subject: [PATCH] ; Fix a recent change in Eshell * lisp/eshell/esh-cmd.el (eshell-manipulate): Fix 'eshell-stringify' calls. (eshell-do-eval): Simplify 'if' condition. --- lisp/eshell/esh-cmd.el | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/lisp/eshell/esh-cmd.el b/lisp/eshell/esh-cmd.el index dc210ff74f9..23b83521f68 100644 --- a/lisp/eshell/esh-cmd.el +++ b/lisp/eshell/esh-cmd.el @@ -1033,10 +1033,10 @@ process(es) in a cons cell like: (progn ,@body) (let ((,tag-symbol ,tag)) (eshell-always-debug-command 'form - "%s\n\n%s" ,tag-symbol ,(eshell-stringify form)) + "%s\n\n%s" ,tag-symbol (eshell-stringify ,form)) ,@body (eshell-always-debug-command 'form - "done %s\n\n%s " ,tag-symbol ,(eshell-stringify form)))))) + "done %s\n\n%s" ,tag-symbol (eshell-stringify ,form)))))) (defun eshell-do-eval (form &optional synchronous-p) "Evaluate FORM, simplifying it as we go. @@ -1110,12 +1110,10 @@ have been replaced by constants." `(progn ,@(cddr args))) ; Multiple ELSE forms (t (caddr args))))) ; Zero or one ELSE forms - (if (consp new-form) - (progn - (setcar form (car new-form)) - (setcdr form (cdr new-form))) - (setcar form 'progn) - (setcdr form new-form)))) + (unless (consp new-form) + (setq new-form (cons 'progn new-form))) + (setcar form (car new-form)) + (setcdr form (cdr new-form)))) (eshell-do-eval form synchronous-p)) ((eq (car form) 'setcar) (setcar (cdr args) (eshell-do-eval (cadr args) synchronous-p)) -- 2.39.5