emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master ae983e92838: ; Fix a recent change in Eshell


From: Jim Porter
Subject: master ae983e92838: ; Fix a recent change in Eshell
Date: Sun, 17 Sep 2023 14:23:36 -0400 (EDT)

branch: master
commit ae983e92838d47f2a42662270b6b23e37eb330a2
Author: Jim Porter <jporterbugs@gmail.com>
Commit: Jim Porter <jporterbugs@gmail.com>

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]