From f2d247b5201da01a19b87e3b17a90891a19c4c60 Mon Sep 17 00:00:00 2001 From: Jim Porter Date: Tue, 26 Oct 2021 15:18:43 -0700 Subject: [PATCH] * lisp/comint.el (comint-term-environment): Make it connection-aware. --- lisp/comint.el | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/lisp/comint.el b/lisp/comint.el index e925b3a4b6..04e39edc42 100644 --- a/lisp/comint.el +++ b/lisp/comint.el @@ -889,12 +889,13 @@ comint-term-environment ;; and there is no way for us to define it here. ;; 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 (format "TERM=%s" comint-terminfo-terminal) - "TERMCAP=" - (format "COLUMNS=%d" (window-width))) - (list "TERM=emacs" - (format "TERMCAP=emacs:co#%d:tc=unknown:" (window-width))))) + (with-connection-local-variables + (if (and (boundp 'system-uses-terminfo) system-uses-terminfo) + (list (format "TERM=%s" comint-terminfo-terminal) + "TERMCAP=" + (format "COLUMNS=%d" (window-width))) + (list "TERM=emacs" + (format "TERMCAP=emacs:co#%d:tc=unknown:" (window-width)))))) (defun comint-nonblank-p (str) "Return non-nil if STR contains non-whitespace syntax." -- 2.25.1