Initialize session and user-environment correctly.
This commit is contained in:
parent
0602e0707f
commit
6e7ae9448f
|
@ -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
|
||||||
|
|
|
@ -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)
|
||||||
|
|
Loading…
Reference in New Issue