]> git.eshelyaron.com Git - emacs.git/commitdiff
Only use the comint environment in comint-derived modes
authorAlyssa Ross <hi@alyssa.is>
Mon, 7 Dec 2020 15:57:31 +0000 (16:57 +0100)
committerLars Ingebrigtsen <larsi@gnus.org>
Mon, 7 Dec 2020 15:58:15 +0000 (16:58 +0100)
* 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

index 787f5d5ef306f3c55ce94d38219cf20f85ce34dd..1b7e1b9dacdfdcf1d5ed5a6066034d10d9c29f3d 100644 (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)