Initialize session and user-environment correctly.

This commit is contained in:
mainzelm 2001-11-27 18:11:38 +00:00
parent 0602e0707f
commit 6e7ae9448f
2 changed files with 13 additions and 2 deletions

View File

@ -280,6 +280,7 @@
package-commands-internal package-commands-internal
filenames ; translate filenames ; translate
usual-resumer ; usual-resumer usual-resumer ; usual-resumer
environments ; with-interaction-environment
fluids-internal ; JMG: get-dynamic-env fluids-internal ; JMG: get-dynamic-env
scsh-utilities scsh-utilities
interrupts interrupts

View File

@ -43,6 +43,7 @@
;;; This is what we export to the user for his programs. ;;; This is what we export to the user for his programs.
(define (dump-scsh-program start filename) (define (dump-scsh-program start filename)
(let ((context (user-context)))
(really-dump-scsh-program (lambda (args) (really-dump-scsh-program (lambda (args)
(with-scsh-sighandlers (with-scsh-sighandlers
#f #f
@ -52,8 +53,17 @@
(install-env) (install-env)
(initialize-cwd) (initialize-cwd)
(init-scsh-vars #f) ; Do it quietly. (init-scsh-vars #f) ; Do it quietly.
(start args)))))) (start-new-session context
filename)) (current-input-port)
(current-output-port)
(current-error-port)
args
#f)
(with-interaction-environment
(user-environment)
(lambda ()
(start args))))))))
filename)))
(define (scsh-stand-alone-resumer start) (define (scsh-stand-alone-resumer start)