1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-01 09:51:22 -08:00
emacs/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.el Merge from origin/emacs-29 2023-01-01 05:47:47 -05:00
em-banner.el ; Don't require 'eshell' in other Eshell files 2023-02-15 15:45:50 -08:00
em-basic.el Add debug instrumentation for Eshell process management 2023-08-31 18:42:03 -07:00
em-cmpl.el Enable remote file name completion in eshell depending on command (bug#65356) 2023-08-23 09:53:40 +02:00
em-dirs.el Apply Eshell tilde expansion before glob expansion 2023-09-02 16:17:27 -07:00
em-elecslash.el Make 'eshell-bol' obsolete 2023-01-14 11:09:02 -08:00
em-extpipe.el Allow unloading Eshell 2023-02-15 17:31:52 -08:00
em-glob.el Apply Eshell tilde expansion before glob expansion 2023-09-02 16:17:27 -07:00
em-hist.el Fix behavior of 'eshell-hist-ignoredups' when set to 'erase' 2023-08-23 18:27:45 -07:00
em-ls.el Don't try to set variable removed in Emacs 21 2023-08-25 01:41:47 +02:00
em-pred.el Apply Eshell tilde expansion before glob expansion 2023-09-02 16:17:27 -07:00
em-prompt.el Display the exit code if the last command failed in Eshell 2023-09-02 15:40:04 -07:00
em-rebind.el Document optional Eshell modules 2023-07-01 12:03:56 -07:00
em-script.el Use 'eshell-with-temp-command' (indirectly) to parse Eshell script files 2023-09-17 21:10:28 -07:00
em-smart.el Make eshell-redisplay into alias for redisplay 2023-08-05 17:57:53 +02:00
em-term.el Add nvim and ncmpcpp to eshell-visual-commands 2023-08-02 21:57:15 +02:00
em-tramp.el ; Don't require 'eshell' in other Eshell files 2023-02-15 15:45:50 -08:00
em-unix.el Add 'compile' builtin command for Eshell 2023-08-16 10:01:49 -07:00
em-xtra.el ; Don't require 'eshell' in other Eshell files 2023-02-15 15:45:50 -08:00
esh-arg.el ; Simplify how to use 'eshell-debug-command' 2023-09-14 17:54:26 -07:00
esh-cmd.el Use 'unwind-protect' in more places in Eshell 2023-09-26 12:29:52 -07:00
esh-ext.el Add support for explicitly-remote commands in Eshell 2023-07-10 12:27:09 -07:00
esh-io.el Display the exit code if the last command failed in Eshell 2023-09-02 15:40:04 -07:00
esh-mode.el ; Throw strings as the values for 'eshell-incomplete' 2023-02-23 14:09:36 -08:00
esh-module.el Allow unloading Eshell 2023-02-15 17:31:52 -08:00
esh-opt.el Allow unloading Eshell 2023-02-15 17:31:52 -08:00
esh-proc.el Use 'unwind-protect' in more places in Eshell 2023-09-26 12:29:52 -07:00
esh-util.el ; Simplify how to use 'eshell-debug-command' 2023-09-14 17:54:26 -07:00
esh-var.el Fix documented Eshell behavior of ignoring leading nils in commands 2023-09-15 13:43:07 -07:00
eshell.el ; Fix debug logging for synchronous commands in Eshell tests 2023-09-01 09:26:14 -07:00