# HG changeset patch # User Richard M. Stallman # Date 1009657874 0 # Node ID f8c910bc4ca1e2521bcf5344759b7a8ff14b8fed # Parent f2c23e762b64cae333bae0dc3c3e9a9926f4e83a (compile-internal): Fix previous change. diff -r f2c23e762b64 -r f8c910bc4ca1 lisp/progmodes/compile.el --- a/lisp/progmodes/compile.el Sat Dec 29 20:12:45 2001 +0000 +++ b/lisp/progmodes/compile.el Sat Dec 29 20:31:14 2001 +0000 @@ -899,25 +899,23 @@ (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)