From f3b0a4316981e6b1f6c2cec3731a228e10d6ae37 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sun, 22 Oct 1995 16:56:46 +0000 Subject: [PATCH] (comint-exec-1): Don't alter EMACS envvar if it's already defined. --- lisp/comint.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lisp/comint.el b/lisp/comint.el index e4ff700ad74..4d5d1a14bfe 100644 --- a/lisp/comint.el +++ b/lisp/comint.el @@ -587,10 +587,11 @@ buffer. The hook `comint-exec-hook' is run after each exec." ;; Some programs that use terminfo get very confused ;; if TERM is not a valid terminal type. (if (and (boundp 'system-uses-terminfo) system-uses-terminfo) - (list "EMACS=t" "TERM=unknown" + (list "TERM=unknown" (format "COLUMNS=%d" (frame-width))) - (list "EMACS=t" "TERM=emacs" + (list "TERM=emacs" (format "TERMCAP=emacs:co#%d:tc=unknown:" (frame-width)))) + (if (getenv "EMACS") nil (list "EMACS=t")) process-environment)) (default-directory (if (file-directory-p default-directory) -- 2.39.2