diff options
| -rw-r--r-- | lisp/progmodes/compile.el | 30 |
1 files changed, 14 insertions, 16 deletions
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index 4b2c3ae05df..f6c65b56d39 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el | |||
| @@ -899,25 +899,23 @@ Returns the compilation buffer created." | |||
| 899 | (funcall compilation-process-setup-function)) | 899 | (funcall compilation-process-setup-function)) |
| 900 | ;; Start the compilation. | 900 | ;; Start the compilation. |
| 901 | (if (fboundp 'start-process) | 901 | (if (fboundp 'start-process) |
| 902 | (let* ((process-environment process-environment) | 902 | (let* ((process-environment |
| 903 | (append | ||
| 904 | (if (and (boundp 'system-uses-terminfo) | ||
| 905 | system-uses-terminfo) | ||
| 906 | (list "TERM=dumb" "TERMCAP=" | ||
| 907 | (format "COLUMNS=%d" (window-width))) | ||
| 908 | (list "TERM=emacs" | ||
| 909 | (format "TERMCAP=emacs:co#%d:tc=unknown:" | ||
| 910 | (window-width)))) | ||
| 911 | ;; Set the EMACS variable, but | ||
| 912 | ;; don't override users' setting of $EMACS. | ||
| 913 | (if (getenv "EMACS") | ||
| 914 | process-environment | ||
| 915 | (cons "EMACS=t" process-environment)))) | ||
| 903 | (proc (start-process-shell-command (downcase mode-name) | 916 | (proc (start-process-shell-command (downcase mode-name) |
| 904 | outbuf | 917 | outbuf |
| 905 | command))) | 918 | command))) |
| 906 | ;; Set the terminal type. | ||
| 907 | ;; There is similar code in comint.el. | ||
| 908 | (setq process-environment | ||
| 909 | (if (and (boundp 'system-uses-terminfo) | ||
| 910 | system-uses-terminfo) | ||
| 911 | (list "TERM=dumb" "TERMCAP=" | ||
| 912 | (format "COLUMNS=%d" (window-width))) | ||
| 913 | (list "TERM=emacs" | ||
| 914 | (format "TERMCAP=emacs:co#%d:tc=unknown:" | ||
| 915 | (window-width))))) | ||
| 916 | ;; Set the EMACS variable, but | ||
| 917 | ;; don't override users' setting of $EMACS. | ||
| 918 | (if (getenv "EMACS") | ||
| 919 | (setq process-environment | ||
| 920 | (cons "EMACS=t" process-environment))) | ||
| 921 | (set-process-sentinel proc 'compilation-sentinel) | 919 | (set-process-sentinel proc 'compilation-sentinel) |
| 922 | (set-process-filter proc 'compilation-filter) | 920 | (set-process-filter proc 'compilation-filter) |
| 923 | (set-marker (process-mark proc) (point) outbuf) | 921 | (set-marker (process-mark proc) (point) outbuf) |