diff options
Diffstat (limited to 'lisp/eshell')
| -rw-r--r-- | lisp/eshell/esh-cmd.el | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/lisp/eshell/esh-cmd.el b/lisp/eshell/esh-cmd.el index 42616e7037d..73c250632ce 100644 --- a/lisp/eshell/esh-cmd.el +++ b/lisp/eshell/esh-cmd.el | |||
| @@ -827,8 +827,8 @@ This macro calls itself recursively, with NOTFIRST non-nil." | |||
| 827 | ((cdr pipeline) t) | 827 | ((cdr pipeline) t) |
| 828 | (t (quote 'last))))) | 828 | (t (quote 'last))))) |
| 829 | (let ((proc ,(car pipeline))) | 829 | (let ((proc ,(car pipeline))) |
| 830 | (setq headproc (or proc headproc)) | 830 | (set headproc (or proc (symbol-value headproc))) |
| 831 | (setq tailproc (or tailproc proc)) | 831 | (set tailproc (or (symbol-value tailproc) proc)) |
| 832 | proc)))))) | 832 | proc)))))) |
| 833 | 833 | ||
| 834 | (defmacro eshell-do-pipelines-synchronously (pipeline) | 834 | (defmacro eshell-do-pipelines-synchronously (pipeline) |
| @@ -861,7 +861,7 @@ This is used on systems where async subprocesses are not supported." | |||
| 861 | (let ((result ,(car pipeline))) | 861 | (let ((result ,(car pipeline))) |
| 862 | ;; tailproc gets the result of the last successful process in | 862 | ;; tailproc gets the result of the last successful process in |
| 863 | ;; the pipeline. | 863 | ;; the pipeline. |
| 864 | (setq tailproc (or result tailproc)) | 864 | (set tailproc (or result (symbol-value tailproc))) |
| 865 | ,(if (cdr pipeline) | 865 | ,(if (cdr pipeline) |
| 866 | `(eshell-do-pipelines-synchronously (quote ,(cdr pipeline)))) | 866 | `(eshell-do-pipelines-synchronously (quote ,(cdr pipeline)))) |
| 867 | result)))) | 867 | result)))) |
| @@ -870,7 +870,11 @@ This is used on systems where async subprocesses are not supported." | |||
| 870 | 870 | ||
| 871 | (defmacro eshell-execute-pipeline (pipeline) | 871 | (defmacro eshell-execute-pipeline (pipeline) |
| 872 | "Execute the commands in PIPELINE, connecting each to one another." | 872 | "Execute the commands in PIPELINE, connecting each to one another." |
| 873 | `(let ((eshell-in-pipeline-p t) headproc tailproc) | 873 | `(let ((eshell-in-pipeline-p t) |
| 874 | (headproc (make-symbol "headproc")) | ||
| 875 | (tailproc (make-symbol "tailproc"))) | ||
| 876 | (set headproc nil) | ||
| 877 | (set tailproc nil) | ||
| 874 | (progn | 878 | (progn |
| 875 | ,(if (fboundp 'make-process) | 879 | ,(if (fboundp 'make-process) |
| 876 | `(eshell-do-pipelines ,pipeline) | 880 | `(eshell-do-pipelines ,pipeline) |
| @@ -880,7 +884,8 @@ This is used on systems where async subprocesses are not supported." | |||
| 880 | (car (aref eshell-current-handles | 884 | (car (aref eshell-current-handles |
| 881 | ,eshell-error-handle)) nil))) | 885 | ,eshell-error-handle)) nil))) |
| 882 | (eshell-do-pipelines-synchronously ,pipeline))) | 886 | (eshell-do-pipelines-synchronously ,pipeline))) |
| 883 | (eshell-process-identity (cons headproc tailproc))))) | 887 | (eshell-process-identity (cons (symbol-value headproc) |
| 888 | (symbol-value tailproc)))))) | ||
| 884 | 889 | ||
| 885 | (defmacro eshell-as-subcommand (command) | 890 | (defmacro eshell-as-subcommand (command) |
| 886 | "Execute COMMAND using a temp buffer. | 891 | "Execute COMMAND using a temp buffer. |