diff options
author | Richard M. Stallman <[email protected]> | 2001-12-26 21:26:25 +0000 |
---|---|---|
committer | Richard M. Stallman <[email protected]> | 2001-12-26 21:26:25 +0000 |
commit | 492e159bb08378b31a67b58f353d55396f06d0f1 (patch) | |
tree | 3cdf72718abcb375be34d68809cb75de195e7355 /lisp/progmodes/compile.el | |
parent | 300682671884d9a834ef867887c1a5a078c0124a (diff) |
(compile-internal): Set TERM variable in process-environment.
Diffstat (limited to 'lisp/progmodes/compile.el')
-rw-r--r-- | lisp/progmodes/compile.el | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index c09a35fd9b..d58689b460 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el @@ -899,14 +899,24 @@ Returns the compilation buffer created." (funcall compilation-process-setup-function)) ;; Start the compilation. (if (fboundp 'start-process) - (let* ((process-environment - ;; Don't override users' setting of $EMACS. - (if (getenv "EMACS") - process-environment - (cons "EMACS=t" process-environment))) + (let* ((process-environment 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. + (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) |