summaryrefslogtreecommitdiff
path: root/lisp/progmodes/compile.el
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2020-12-07 16:57:31 +0100
committerLars Ingebrigtsen <larsi@gnus.org>2020-12-07 16:58:15 +0100
commit13651833c73b78e509a47ab38b8c5a60134f04fc (patch)
tree231660d913cb161960198cf4d504ba6a2b568784 /lisp/progmodes/compile.el
parent60cf0aa21ce618a7d2620a01977232dbe5c9c924 (diff)
downloademacs-13651833c73b78e509a47ab38b8c5a60134f04fc.tar.gz
emacs-13651833c73b78e509a47ab38b8c5a60134f04fc.tar.bz2
emacs-13651833c73b78e509a47ab38b8c5a60134f04fc.zip
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
Diffstat (limited to 'lisp/progmodes/compile.el')
-rw-r--r--lisp/progmodes/compile.el3
1 files changed, 2 insertions, 1 deletions
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)