]> git.eshelyaron.com Git - emacs.git/commit
Simplify usage of 'while' forms in Eshell's iterative evaluation
authorJim Porter <jporterbugs@gmail.com>
Sun, 29 Jan 2023 01:04:11 +0000 (17:04 -0800)
committerJim Porter <jporterbugs@gmail.com>
Fri, 17 Mar 2023 05:17:02 +0000 (22:17 -0700)
commit1565dbcae35c1e42b22066fde226e3b063614a9e
tree70207fcd35d357263091c916599f1b9f3a92a692
parente01660ca50ad360db78e5a0206ed824465c2aada
Simplify usage of 'while' forms in Eshell's iterative evaluation

Now, 'eshell-do-eval' rewrites 'while' forms to let-bind variables for
the command and test bodies.  This means that external code, such as
command rewriting hooks, no longer has to worry about this, making it
easier to pass "normal" Lisp forms to 'eshell-do-eval' (bug#61954).

* lisp/eshell/esh-cmd.el (eshell-command-body, eshell-test-body): No
longer used outside of 'eshell-do-eval', so rename to...
(eshell--command-body, eshell--test-body): ... these.
(Command evaluation macros): Remove obsolete description about 'if'
and 'while' forms.
(eshell-rewrite-for-command, eshell-structure-basic-command): Remove
'eshell-command-body' and 'eshell-test-body'.
(eshell-do-eval): Reimplement handling of 'while' forms.
lisp/eshell/esh-cmd.el