]> git.eshelyaron.com Git - emacs.git/commit
Simplify how Eshell's iterative evaluation handles 'if' forms
authorJim Porter <jporterbugs@gmail.com>
Sat, 28 Jan 2023 23:06:31 +0000 (15:06 -0800)
committerJim Porter <jporterbugs@gmail.com>
Fri, 17 Mar 2023 05:16:52 +0000 (22:16 -0700)
commite01660ca50ad360db78e5a0206ed824465c2aada
tree37de47b3e042ff082d0db4c98647659aaadec623
parent67a2b320f61642d0cbbce31ac34d4e1ce77c9230
Simplify how Eshell's iterative evaluation handles 'if' forms

The previous implementation used 'eshell-test-body' and
'eshell-command-body' to track the condition and the then/else forms,
but those special variables are only needed for looping.  'if' only
evaluates each form once at most (bug#61954).

* lisp/eshell/esh-cmd.el (Command evaluation macros): Remove 'if' from
the notes about 'eshell-test-body' and 'eshell-command-body'.
(eshell-do-eval): Reimplement evaluation of 'if' forms.
(eshell-eval-command): Don't let-bind 'eshell-command-body' and
'eshell-test-body'; they're no longer needed here.
lisp/eshell/esh-cmd.el