1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-01 01:41:01 -08:00
emacs/test/lisp/eshell
Jim Porter eef32d13da Use 'unwind-protect' in more places in Eshell
This lets us simplify the logic for how we reset
'eshell-current-command' and 'eshell-last-async-procs', as well as
improving correctness of Eshell command forms in a few esoteric
scenarios.  Additionally, this helps set the stage for better support
of background commands in Eshell (bug#66164).

* lisp/eshell/esh-cmd.el (eshell-cmd-initialize): Remove addition to
'eshell-post-command-hook'; this is handled in 'eshell-resume-command'
and 'eshell-resume-eval' now.
(eshell-resume-command): Handle resetting the prompt as needed.
(eshell-resume-eval): Use 'unwind-protect' to ensure that we set
'eshell-last-async-procs' and 'eshell-current-comment' at the right
times.
(eshell-parse-command, eshell-trap-errors, eshell-manipulate): Use
'unwind-protect'.
(eshell-do-eval): Allow 'eshell-defer' to pass through
'unwind-protect' forms without actually calling the unwinding forms
(yet).

* lisp/eshell/esh-proc.el (eshell-kill-process-function)
(eshell-reset-after-proc): Make obsolete.  The behavior is now handled
in 'eshell-resume-command'.
(eshell-gather-process-output, eshell-sentinel)
(eshell-interrupt-process, eshell-kill-process, eshell-quit-process)
(eshell-stop-process, eshell-continue-process): Run 'eshell-kill-hook'
directly.

* test/lisp/eshell/esh-cmd-tests.el (esh-cmd-test/throw): New test.
2023-09-26 12:29:52 -07:00
..
em-alias-tests.el Merge from origin/emacs-29 2023-01-01 05:47:47 -05:00
em-basic-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
em-cmpl-tests.el Avoid parsing some Eshell forms when performing completion 2023-03-28 12:03:29 -07:00
em-dirs-tests.el Fix listing of directory contents after "cd" in Eshell 2023-08-07 19:35:43 -07:00
em-extpipe-tests.el ; Fix Eshell tests 2023-08-14 09:20:34 -07:00
em-glob-tests.el Allow splicing Eshell globs in-place 2023-08-21 11:42:46 -07:00
em-hist-tests.el Fix behavior of 'eshell-hist-ignoredups' when set to 'erase' 2023-08-23 18:27:45 -07:00
em-ls-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
em-pred-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
em-prompt-tests.el Display the exit code if the last command failed in Eshell 2023-09-02 15:40:04 -07:00
em-script-tests.el Merge from origin/emacs-29 2023-01-01 05:47:47 -05:00
em-tramp-tests.el Merge from origin/emacs-29 2023-01-01 05:47:47 -05:00
em-unix-tests.el Add 'compile' builtin command for Eshell 2023-08-16 10:01:49 -07:00
esh-arg-tests.el Add support for completing special references (e.g. buffers) in Eshell 2023-03-11 18:49:28 -08:00
esh-cmd-tests.el Use 'unwind-protect' in more places in Eshell 2023-09-26 12:29:52 -07:00
esh-ext-tests.el Add support for explicitly-remote commands in Eshell 2023-07-10 12:27:09 -07:00
esh-io-tests.el ; Move some Eshell tests to more-topical files 2023-09-10 10:38:25 -07:00
esh-opt-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
esh-proc-tests.el ; Improve recent change to printing exit status in Eshell 2023-09-12 18:13:52 -07:00
esh-util-tests.el Merge from origin/emacs-29 2023-09-02 04:28:17 -04:00
esh-var-tests.el Fix documented Eshell behavior of ignoring leading nils in commands 2023-09-15 13:43:07 -07:00
eshell-tests-helpers.el ; Fix debug logging for synchronous commands in Eshell tests 2023-09-01 09:26:14 -07:00
eshell-tests-unload.el Allow unloading Eshell 2023-02-15 17:31:52 -08:00
eshell-tests.el ; Fix last change 2023-09-17 17:34:20 -07:00