; Fix a recent change in Eshell

* lisp/eshell/esh-cmd.el (eshell-manipulate): Fix 'eshell-stringify' calls.
(eshell-do-eval): Simplify 'if' condition.
This commit is contained in:
Jim Porter 2023-09-17 11:22:19 -07:00
parent 16453ed611
commit ae983e9283

View file

@ -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))