summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>2002-10-23 17:45:18 +0000
committerRichard M. Stallman <rms@gnu.org>2002-10-23 17:45:18 +0000
commit9a5682477a2f4f18fa1c0c05820a1d5ccc5bd861 (patch)
tree96830372e99d7431043f5b05b84d13cb5624b084
parentaebbdf2ab46a0483c5a254530e3f7351cfad9ab1 (diff)
downloademacs-9a5682477a2f4f18fa1c0c05820a1d5ccc5bd861.tar.gz
(compile-internal): Update process-environment before calling start-process.
-rw-r--r--lisp/progmodes/compile.el29
1 files changed, 14 insertions, 15 deletions
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el
index c26044dd9ed..a13796e1d5b 100644
--- a/lisp/progmodes/compile.el
+++ b/lisp/progmodes/compile.el
@@ -826,24 +826,23 @@ Returns the compilation buffer created."
(funcall compilation-process-setup-function))
;; Start the compilation.
(if (fboundp 'start-process)
- (let* ((process-environment process-environment)
+ (let* ((process-environment
+ (append
+ (if (and (boundp 'system-uses-terminfo)
+ system-uses-terminfo)
+ (list "TERM=dumb" "TERMCAP="
+ (format "COLUMNS=%d" (window-width)))
+ (list "TERM=emacs"
+ (format "TERMCAP=emacs:co#%d:tc=unknown:"
+ (window-width))))
+ ;; Set the EMACS variable, but
+ ;; don't override users' setting of $EMACS.
+ (if (getenv "EMACS")
+ process-environment
+ (cons "EMACS=t" process-environment))))
(proc (start-process-shell-command (downcase mode-name)
outbuf
command)))
- ;; Set the terminal type
- (setq process-environment
- (if (and (boundp 'system-uses-terminfo)
- system-uses-terminfo)
- (list "TERM=dumb" "TERMCAP="
- (format "COLUMNS=%d" (window-width)))
- (list "TERM=emacs"
- (format "TERMCAP=emacs:co#%d:tc=unknown:"
- (window-width)))))
- ;; Set the EMACS variable, but
- ;; don't override users' setting of $EMACS.
- (or (getenv "EMACS")
- (setq process-environment
- (cons "EMACS=t" process-environment)))
(set-process-sentinel proc 'compilation-sentinel)
(set-process-filter proc 'compilation-filter)
(set-marker (process-mark proc) (point) outbuf)