On 10/9/2024 10:33 AM, Christopher Howard wrote: > > (same with or without emacs -Q) > 1. M-x eshell > 2. clear > > Gives error "wrong-type-argument listp progn". I think this is probably the result of some improvements I've made to Eshell's command evaluator that revealed a latent bug in 'eshell/clear' (it actually runs a *second* Eshell command consisting only of newlines, which shouldn't be necessary). The actual error reported here is fixed in Emacs 31; in Emacs 30, 'eshell-do-eval' mis-evaluates an empty '(progn)', but that generally shouldn't occur except in odd cases like this. The "clear" command still doesn't *work* correctly in Emacs 31 though. Attached is the smallest fix I could come up with for this. This is made somewhat more complex due to 'eshell/clear' also being used as an interactive Emacs-level command. The two forms ("clear" at an Eshell prompt and "M-x eshell/clear" in Emacs) should probably be separate functions entirely since they behave differently regarding the current prompt, but for the sake of compatibility, let's keep them fused together for now... Eli, does this look ok for the release branch? It fixes a regression from Emacs 29 and adds a pair of regression tests to prevent future breakage. (If and when this merges, I'll see about a more-thorough fix for the master branch too.)