From d7e84efb1a6c99890c84cf988a74d7a2cab987bf Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Mon, 18 Apr 1994 22:37:30 +0000 Subject: [PATCH] (shell-command-sentinel): Do nothing if buffer is dead. --- lisp/simple.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/simple.el b/lisp/simple.el index 19aca0e194a..aec30025f35 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -710,7 +710,8 @@ This cannot be done asynchronously." ;; We have a sentinel to prevent insertion of a termination message ;; in the buffer itself. (defun shell-command-sentinel (process signal) - (if (memq (process-status process) '(exit signal)) + (if (and (memq (process-status process) '(exit signal)) + (buffer-name (process-buffer process))) (progn (message "%s: %s." (car (cdr (cdr (process-command process)))) -- 2.39.5