Initialize session and user-environment correctly.

This commit is contained in:
mainzelm 2001-11-27 18:29:12 +00:00
parent 3ba6ea5e66
commit 9d89a7d69c
2 changed files with 16 additions and 4 deletions

View File

@ -248,6 +248,8 @@
command-processor ; command-output
filenames ; translate
scheme-level-2-internal ; usual-resumer
package-commands-internal ;user-environment
environments ; with-interaction-environment
scheme)
(files startup)
(optimize auto-integrate)

View File

@ -42,10 +42,20 @@
;;; This is what we export to the user for his programs.
(define (dump-scsh-program start filename)
(really-dump-scsh-program (lambda (args)
(let ((context (user-context)))
(really-dump-scsh-program
(lambda (args)
(with-new-session context ; "Log in" user.
(current-input-port) (current-output-port)
args
#f
(lambda ()
(with-interaction-environment
(user-environment) ; <-- from CONTEXT.
(lambda ()
(init-scsh-vars #t) ; Do it quietly.
(start args))
filename))
(start args))))))
filename)))
(define (scsh-stand-alone-resumer start)