diff options
| author | Richard M. Stallman | 2001-12-26 21:26:25 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2001-12-26 21:26:25 +0000 |
| commit | 492e159bb08378b31a67b58f353d55396f06d0f1 (patch) | |
| tree | 3cdf72718abcb375be34d68809cb75de195e7355 | |
| parent | 300682671884d9a834ef867887c1a5a078c0124a (diff) | |
| download | emacs-492e159bb08378b31a67b58f353d55396f06d0f1.tar.gz emacs-492e159bb08378b31a67b58f353d55396f06d0f1.zip | |
(compile-internal): Set TERM variable in process-environment.
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/progmodes/compile.el | 20 |
2 files changed, 20 insertions, 5 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 84e414ec738..2906265bdef 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2001-12-26 Richard M. Stallman <rms@gnu.org> | ||
| 2 | |||
| 3 | * progmodes/compile.el (compile-internal): | ||
| 4 | Set TERM variable in process-environment. | ||
| 5 | |||
| 1 | 2001-12-25 Richard M. Stallman <rms@gnu.org> | 6 | 2001-12-25 Richard M. Stallman <rms@gnu.org> |
| 2 | 7 | ||
| 3 | * help-mode.el (help-xref-on-pp): Catch and ignore errors in scanning | 8 | * help-mode.el (help-xref-on-pp): Catch and ignore errors in scanning |
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index c09a35fd9be..d58689b460a 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el | |||
| @@ -899,14 +899,24 @@ 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 | 902 | (let* ((process-environment process-environment) |
| 903 | ;; Don't override users' setting of $EMACS. | ||
| 904 | (if (getenv "EMACS") | ||
| 905 | process-environment | ||
| 906 | (cons "EMACS=t" process-environment))) | ||
| 907 | (proc (start-process-shell-command (downcase mode-name) | 903 | (proc (start-process-shell-command (downcase mode-name) |
| 908 | outbuf | 904 | outbuf |
| 909 | command))) | 905 | command))) |
| 906 | ;; Set the terminal type | ||
| 907 | (setq process-environment | ||
| 908 | (if (and (boundp 'system-uses-terminfo) | ||
| 909 | system-uses-terminfo) | ||
| 910 | (list "TERM=dumb" "TERMCAP=" | ||
| 911 | (format "COLUMNS=%d" (window-width))) | ||
| 912 | (list "TERM=emacs" | ||
| 913 | (format "TERMCAP=emacs:co#%d:tc=unknown:" | ||
| 914 | (window-width))))) | ||
| 915 | ;; Set the EMACS variable, but | ||
| 916 | ;; don't override users' setting of $EMACS. | ||
| 917 | (if (getenv "EMACS") | ||
| 918 | (setq process-environment | ||
| 919 | (cons "EMACS=t" process-environment))) | ||
| 910 | (set-process-sentinel proc 'compilation-sentinel) | 920 | (set-process-sentinel proc 'compilation-sentinel) |
| 911 | (set-process-filter proc 'compilation-filter) | 921 | (set-process-filter proc 'compilation-filter) |
| 912 | (set-marker (process-mark proc) (point) outbuf) | 922 | (set-marker (process-mark proc) (point) outbuf) |