Initialize session and user-environment correctly.
This commit is contained in:
parent
3ba6ea5e66
commit
9d89a7d69c
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue