diff options
| author | Tino Calancha | 2020-01-23 10:57:16 +0100 |
|---|---|---|
| committer | Tino Calancha | 2020-01-23 10:58:21 +0100 |
| commit | 72011f23c3135690f65262f01ea92a53ff84b4e1 (patch) | |
| tree | ab2dab89e738676412adc5912026691cd42fa3ce | |
| parent | 6f580542c1796d3e7ba4d1dd40b2fe73fe00e5db (diff) | |
| download | emacs-72011f23c3135690f65262f01ea92a53ff84b4e1.tar.gz emacs-72011f23c3135690f65262f01ea92a53ff84b4e1.zip | |
Fix bug 39218
* lisp/simple.el (shell-command):
Ensure a shell command ending with `&' is run asynchronously.
| -rw-r--r-- | lisp/simple.el | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lisp/simple.el b/lisp/simple.el index f022b8495be..9bfd58f7d61 100644 --- a/lisp/simple.el +++ b/lisp/simple.el | |||
| @@ -3646,10 +3646,11 @@ impose the use of a shell (with its need to quote arguments)." | |||
| 3646 | (if handler | 3646 | (if handler |
| 3647 | (funcall handler 'shell-command command output-buffer error-buffer) | 3647 | (funcall handler 'shell-command command output-buffer error-buffer) |
| 3648 | (if (and output-buffer | 3648 | (if (and output-buffer |
| 3649 | (not (string-match "[ \t]*&[ \t]*\\'" command)) | ||
| 3649 | (or (eq output-buffer (current-buffer)) | 3650 | (or (eq output-buffer (current-buffer)) |
| 3650 | (and (stringp output-buffer) (eq (get-buffer output-buffer) (current-buffer))) | 3651 | (and (stringp output-buffer) (eq (get-buffer output-buffer) (current-buffer))) |
| 3651 | (not (or (bufferp output-buffer) (stringp output-buffer))))) ; Bug#39067 | 3652 | (not (or (bufferp output-buffer) (stringp output-buffer))))) ; Bug#39067 |
| 3652 | ;; Output goes in current buffer. | 3653 | ;; Synchronous command with output in current buffer. |
| 3653 | (let ((error-file | 3654 | (let ((error-file |
| 3654 | (and error-buffer | 3655 | (and error-buffer |
| 3655 | (make-temp-file | 3656 | (make-temp-file |