mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-06 14:30:50 -08:00
Use 'eshell-with-handles' when executing an Eshell file
This makes sure we close the handles as we should, which is important for writing the output to an actual file (bug#72857). * lisp/eshell/em-script.el (esh-cmd): Require this, just to be explicit. (eshell-execute-file): Use 'eshell-with-handles'.
This commit is contained in:
parent
10802fb00f
commit
e97ab1c413
1 changed files with 4 additions and 4 deletions
|
|
@ -24,6 +24,7 @@
|
||||||
;;; Code:
|
;;; Code:
|
||||||
|
|
||||||
(require 'esh-mode)
|
(require 'esh-mode)
|
||||||
|
(require 'esh-cmd)
|
||||||
(require 'esh-io)
|
(require 'esh-io)
|
||||||
|
|
||||||
;;;###esh-module-autoload
|
;;;###esh-module-autoload
|
||||||
|
|
@ -127,10 +128,9 @@ Comments begin with `#'."
|
||||||
(with-temp-buffer
|
(with-temp-buffer
|
||||||
(eshell-mode)
|
(eshell-mode)
|
||||||
(eshell-do-eval
|
(eshell-do-eval
|
||||||
`(let ((eshell-current-handles
|
`(eshell-with-handles (,stdout 'insert ,stderr 'insert)
|
||||||
(eshell-create-handles ,stdout 'insert ,stderr 'insert))
|
(let ((eshell-current-subjob-p))
|
||||||
(eshell-current-subjob-p))
|
,(eshell--source-file file args)))
|
||||||
,(eshell--source-file file args))
|
|
||||||
t))))
|
t))))
|
||||||
|
|
||||||
(cl-defstruct (eshell-princ-target
|
(cl-defstruct (eshell-princ-target
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue