--- Begin Message ---
Subject: |
30.0.50; [PATCH] Simplify structured commands in Eshell |
Date: |
Fri, 3 Mar 2023 23:28:46 -0800 |
Structured commands are just Eshell flow control commands, like 'if' and
'while'. These expected you to set 'eshell-test-body' and
'eshell-command-body' when implementing them, and were very hard to get
right (see bug#12571 for example).
Instead, let's improve Eshell's iterative command evaluation some more
so that you can write the implementations for these commands like
normal. I think this is beneficial for two main reasons: a) it should
get us closer to replacing Eshell's iterative evaluation with the CPS
machinery in generator.el (bug#37635)[1], and b) third-parties should
have an easier time writing their own fancy Eshell commands using the
command-rewriting hooks.
Given that we have fairly thorough regression tests in Eshell now, I'm
pretty confident that these patches don't break anything.
[1] I think I mentioned it elsewhere, but I'm hoping to make sure that
when we do switch to the CPS machinery (or maybe to threads), it's just
a drop-in replacement. That way, if there are problems, it should be
easy to revert to the classic iterative evaluation code. Maybe we could
even provide a defcustom for it just in case.
0001-Simplify-iteration-in-Eshell-for-loops.patch
Description: Text document
0002-Simplify-how-Eshell-s-iterative-evaluation-handles-i.patch
Description: Text document
0003-Simplify-usage-of-while-forms-in-Eshell-s-iterative-.patch
Description: Text document
--- End Message ---