From: Tino Calancha Date: Thu, 23 Jan 2020 09:56:02 +0000 (+0100) Subject: Backport: Fix bug 39218 X-Git-Tag: emacs-27.0.90~107 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=e1deafd39d;p=emacs.git Backport: Fix bug 39218 * lisp/simple.el (shell-command): Ensure a shell command ending with `&' is run asynchronously. --- diff --git a/lisp/simple.el b/lisp/simple.el index 3546bef600d..73aea415c77 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -3640,10 +3640,11 @@ impose the use of a shell (with its need to quote arguments)." (if handler (funcall handler 'shell-command command output-buffer error-buffer) (if (and output-buffer + (not (string-match "[ \t]*&[ \t]*\\'" command)) (or (eq output-buffer (current-buffer)) (and (stringp output-buffer) (eq (get-buffer output-buffer) (current-buffer))) (not (or (bufferp output-buffer) (stringp output-buffer))))) ; Bug#39067 - ;; Output goes in current buffer. + ;; Synchronous command with output in current buffer. (let ((error-file (and error-buffer (make-temp-file