diff options
| author | Jim Porter | 2024-07-16 22:07:33 -0700 |
|---|---|---|
| committer | Jim Porter | 2024-07-18 11:10:04 -0700 |
| commit | 1550213613b397da6e879cc0d00ede916f6c62cc (patch) | |
| tree | 0bfddf96aee623529bfba60790adb3b28449af0d /test/lisp/eshell/em-extpipe-tests.el | |
| parent | 76874df05f7758deb4f47b7df278e54a66456fc9 (diff) | |
| download | emacs-1550213613b397da6e879cc0d00ede916f6c62cc.tar.gz emacs-1550213613b397da6e879cc0d00ede916f6c62cc.zip | |
Improve handling of deferrable Eshell commands
Now, we use the 'eshell-deferrable' wrapper to wrap a form that returns
a process (or list thereof). This improves upon the old method, which
failed to handle 'eshell-replace-command' correctly. In that case,
Eshell would fail to unmark commands as deferrable when necessary
(e.g. for commands in pipelines).
* lisp/eshell/esh-cmd.el (eshell-deferrable-commands): Make into a
defvar.
(eshell-deferrable): New function...
(eshell-structure-basic-command): ... use it.
(eshell-trap-errors): Rename to...
(eshell-do-command): ... this, and use 'eshell-deferrable'. Update
callers.
(eshell--unmark-deferrable): Remove. Update callers.
(eshell-execute-pipeline): Remove 'eshell-process-identity'.
(eshell-process-identity, eshell-named-command*, eshell-lisp-command*):
Make obsolete.
* test/lisp/eshell/esh-cmd-tests.el (eshell-test-replace-command): New
function.
(esh-cmd-test/pipeline/replace-command): New test.
Diffstat (limited to 'test/lisp/eshell/em-extpipe-tests.el')
| -rw-r--r-- | test/lisp/eshell/em-extpipe-tests.el | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/lisp/eshell/em-extpipe-tests.el b/test/lisp/eshell/em-extpipe-tests.el index c5f1301cd3b..4c3adbc2d90 100644 --- a/test/lisp/eshell/em-extpipe-tests.el +++ b/test/lisp/eshell/em-extpipe-tests.el | |||
| @@ -40,7 +40,7 @@ | |||
| 40 | ((should-parse (expected) | 40 | ((should-parse (expected) |
| 41 | `(let ((shell-file-name "sh") | 41 | `(let ((shell-file-name "sh") |
| 42 | (shell-command-switch "-c")) | 42 | (shell-command-switch "-c")) |
| 43 | ;; Strip `eshell-trap-errors'. | 43 | ;; Strip `eshell-do-command'. |
| 44 | (should (equal ,expected | 44 | (should (equal ,expected |
| 45 | (cadadr (eshell-parse-command input)))))) | 45 | (cadadr (eshell-parse-command input)))))) |
| 46 | (with-substitute-for-temp (&rest body) | 46 | (with-substitute-for-temp (&rest body) |