summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Heuer <kwzh@gnu.org>1994-04-08 06:57:27 +0000
committerKarl Heuer <kwzh@gnu.org>1994-04-08 06:57:27 +0000
commit03bfa8f303bf7426db8eae85da0243a54da71f34 (patch)
treeca05e6731f4636b8f2e5bc94b0621738a98e94af
parent3a676d68828c0ed157d2711d63826101f005231a (diff)
downloademacs-03bfa8f303bf7426db8eae85da0243a54da71f34.tar.gz
(comint-exec-1): Handle both termcap and terminfo.
-rw-r--r--lisp/comint.el10
1 files changed, 7 insertions, 3 deletions
diff --git a/lisp/comint.el b/lisp/comint.el
index 11e49d4fdb7..8be11e72219 100644
--- a/lisp/comint.el
+++ b/lisp/comint.el
@@ -553,9 +553,13 @@ buffer. The hook `comint-exec-hook' is run after each exec."
(defun comint-exec-1 (name buffer command switches)
(let ((process-environment
- (nconc (list "EMACS=t" "TERM=emacs"
- (format "TERMCAP=emacs:co#%d:tc=unknown" (frame-width)))
- process-environment)))
+ (nconc
+ (if (and (boundp 'system-uses-terminfo) system-uses-terminfo)
+ (list "EMACS=t" "TERM=unknown"
+ (format "COLUMNS=%d" (frame-width)))
+ (list "EMACS=t" "TERM=emacs"
+ (format "TERMCAP=emacs:co#%d:tc=unknown" (frame-width))))
+ process-environment)))
(apply 'start-process name buffer command switches)))
;;; Input history processing in a buffer