From 2ab39cc263147b7569199915fcee9f2158f3b7b2 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Mon, 21 Jul 2025 13:41:18 +0300 Subject: [PATCH] ; * lisp/simple.el (shell-command): Fix last change (bug#79067). (cherry picked from commit 527dc4fafff13a86cc1b9c6dfc174c592a29b566) --- lisp/simple.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/simple.el b/lisp/simple.el index 62130ce1cf3..d362c0c8272 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -4577,7 +4577,8 @@ impose the use of a shell (with its need to quote arguments)." ;; Output goes in a separate buffer. (if (string-match "[ \t]*&[ \t]*\\'" command) ;; Command ending with ampersand means asynchronous. - (let* ((_ (or (bufferp output-buffer) + (let* ((_ (or (null output-buffer) + (bufferp output-buffer) (stringp output-buffer) (error "Asynchronous shell commands cannot output to current buffer"))) (buffer (get-buffer-create -- 2.39.5