Initialize session and user-environment correctly.
This commit is contained in:
parent
3ba6ea5e66
commit
9d89a7d69c
|
@ -248,6 +248,8 @@
|
||||||
command-processor ; command-output
|
command-processor ; command-output
|
||||||
filenames ; translate
|
filenames ; translate
|
||||||
scheme-level-2-internal ; usual-resumer
|
scheme-level-2-internal ; usual-resumer
|
||||||
|
package-commands-internal ;user-environment
|
||||||
|
environments ; with-interaction-environment
|
||||||
scheme)
|
scheme)
|
||||||
(files startup)
|
(files startup)
|
||||||
(optimize auto-integrate)
|
(optimize auto-integrate)
|
||||||
|
|
|
@ -42,10 +42,20 @@
|
||||||
;;; 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)
|
||||||
(really-dump-scsh-program (lambda (args)
|
(let ((context (user-context)))
|
||||||
(init-scsh-vars #t) ; Do it quietly.
|
(really-dump-scsh-program
|
||||||
(start args))
|
(lambda (args)
|
||||||
filename))
|
(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)))
|
||||||
|
|
||||||
|
|
||||||
(define (scsh-stand-alone-resumer start)
|
(define (scsh-stand-alone-resumer start)
|
||||||
|
|
Loading…
Reference in New Issue