From 75da830272fcc55cf45026a2a24a5ea56b818f33 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sat, 29 Dec 2001 20:31:14 +0000 Subject: (compile-internal): Fix previous change. --- lisp/progmodes/compile.el | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) (limited to 'lisp/progmodes/compile.el') diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index 4b2c3ae05d..f6c65b56d3 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el @@ -899,25 +899,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. - ;; There is similar code in comint.el. - (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. - (if (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) -- cgit v1.2.3