(compile-internal): Set TERM variable in process-environment.
This commit is contained in:
parent
3006826718
commit
492e159bb0
2 changed files with 20 additions and 5 deletions
|
@ -1,3 +1,8 @@
|
|||
2001-12-26 Richard M. Stallman <rms@gnu.org>
|
||||
|
||||
* progmodes/compile.el (compile-internal):
|
||||
Set TERM variable in process-environment.
|
||||
|
||||
2001-12-25 Richard M. Stallman <rms@gnu.org>
|
||||
|
||||
* help-mode.el (help-xref-on-pp): Catch and ignore errors in scanning
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue