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
This commit is contained in:
Alyssa Ross 2020-12-07 16:57:31 +01:00 committed by Lars Ingebrigtsen
parent 60cf0aa21c
commit 13651833c7

View file

@ -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)