From 13651833c73b78e509a47ab38b8c5a60134f04fc Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Mon, 7 Dec 2020 16:57:31 +0100 Subject: [PATCH] Only use the comint environment in comint-derived modes * lisp/progmodes/compile.el (compilation-start): Only use the comint environment in comint-derived modes (bug#45095). Copyright-paperwork-exempt: yes --- lisp/progmodes/compile.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index 787f5d5ef30..1b7e1b9dacd 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el @@ -1868,7 +1868,8 @@ Returns the compilation buffer created." (let ((process-environment (append compilation-environment - (comint-term-environment) + (and (derived-mode-p 'comint-mode) + (comint-term-environment)) (list (format "INSIDE_EMACS=%s,compile" emacs-version)) (copy-sequence process-environment)))) (set (make-local-variable 'compilation-arguments) -- 2.39.2