summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1992-05-05 04:11:23 +0000
committerRichard M. Stallman <rms@gnu.org>1992-05-05 04:11:23 +0000
commit218330f56f7e5e0140956e5878f451de1dbd5273 (patch)
tree73b975c4ace033ae291ca0213eff266cb2d15a2c /lisp
parent2db8d767a3b340c45342df7fee991f7276a99acb (diff)
downloademacs-218330f56f7e5e0140956e5878f451de1dbd5273.tar.gz
*** empty log message ***
Diffstat (limited to 'lisp')
-rw-r--r--lisp/terminal.el46
1 files changed, 17 insertions, 29 deletions
diff --git a/lisp/terminal.el b/lisp/terminal.el
index bae0d4c5639..314cc45d707 100644
--- a/lisp/terminal.el
+++ b/lisp/terminal.el
@@ -1079,35 +1079,23 @@ work with `terminfo' we will try to use it."
;;-- For disgusting programs.
;; (VI? What losers need these, I wonder?)
"im=:ei=:dm=:ed=:mi:do=^p^j:nl=^p^j:bs:")))
- (if (fboundp 'start-subprocess)
- ;; this winning function would do everything, except that
- ;; rms doesn't want it.
- (setq te-process (start-subprocess "terminal-emulator"
- program args
- 'channel-type 'terminal
- 'filter 'te-filter
- 'buffer (current-buffer)
- 'sentinel 'te-sentinel
- 'modify-environment
- (list (cons "TERM" "emacs-virtual")
- (cons "TERMCAP" termcap))))
- ;; so instead we resort to this...
- (setq te-process (start-process "terminal-emulator" (current-buffer)
- "/bin/sh" "-c"
- ;; Yuck!!! Start a shell to set some terminal
- ;; control characteristics. Then start the
- ;; "env" program to setup the terminal type
- ;; Then finally start the program we wanted.
- (format "%s; exec %s TERM=emacs-virtual %s %s"
- te-stty-string
- (te-quote-arg-for-sh
- (concat exec-directory "env"))
- (te-quote-arg-for-sh
- (concat "TERMCAP=" termcap))
- (mapconcat 'te-quote-arg-for-sh
- (cons program args) " "))))
- (set-process-filter te-process 'te-filter)
- (set-process-sentinel te-process 'te-sentinel)))
+ (let ((process-environment
+ (cons "TERM=emacs-virtual"
+ (cons (concat "TERMCAP=" termcap)
+ process-environment))))
+ (setq te-process
+ (start-process "terminal-emulator" (current-buffer)
+ "/bin/sh" "-c"
+ ;; Yuck!!! Start a shell to set some terminal
+ ;; control characteristics. Then start the
+ ;; "env" program to setup the terminal type
+ ;; Then finally start the program we wanted.
+ (format "%s; exec %s"
+ te-stty-string
+ (mapconcat 'te-quote-arg-for-sh
+ (cons program args) " ")))))
+ (set-process-filter te-process 'te-filter)
+ (set-process-sentinel te-process 'te-sentinel))
(error (fundamental-mode)
(signal (car err) (cdr err))))
;; sigh