]> git.eshelyaron.com Git - emacs.git/commitdiff
(compile-internal): Set TERM variable in process-environment.
authorRichard M. Stallman <rms@gnu.org>
Wed, 26 Dec 2001 21:31:58 +0000 (21:31 +0000)
committerRichard M. Stallman <rms@gnu.org>
Wed, 26 Dec 2001 21:31:58 +0000 (21:31 +0000)
lisp/ChangeLog
lisp/progmodes/compile.el

index a74bc670a52bfc21c1ed909eec330104c16b92b1..4dd90aec51ca3831cf449ae999760fd0b4bbbb8f 100644 (file)
@@ -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-21  Eli Zaretskii  <eliz@is.elta.co.il>
 
        * info.el (Info-select-node): If Info-use-header-line is nil, set
index d36011db3264aa0fc68fcbc2586992c387c802d7..f49948d2333c85945e7b88c056c8d8d21a0ee2c9 100644 (file)
@@ -826,14 +826,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)