Save and restore the current package for -le and -lel.
This commit is contained in:
parent
8b334402ae
commit
05e38a42da
14
scsh/top.scm
14
scsh/top.scm
|
@ -247,8 +247,10 @@
|
|||
|
||||
((string=? (car switch) "-le")
|
||||
; (format #t "loading exec file ~s~%" (cdr switch))
|
||||
(load-quietly (cdr switch) (user-command-environment))
|
||||
(lp switches script-loaded?))
|
||||
(let ((current-package (interaction-environment)))
|
||||
(load-quietly (cdr switch) (user-command-environment))
|
||||
(set-interaction-environment! current-package)
|
||||
(lp switches script-loaded?)))
|
||||
|
||||
((string=? (car switch) "-ll")
|
||||
(load-library-file (cdr switch) (lib-dirs) script-file
|
||||
|
@ -256,9 +258,11 @@
|
|||
(lp switches script-loaded?))
|
||||
|
||||
((string=? (car switch) "-lel")
|
||||
(load-library-file (cdr switch) (lib-dirs) script-file
|
||||
(user-command-environment))
|
||||
(lp switches script-loaded?))
|
||||
(let ((current-package (interaction-environment)))
|
||||
(load-library-file (cdr switch) (lib-dirs) script-file
|
||||
(user-command-environment))
|
||||
(set-interaction-environment! current-package)
|
||||
(lp switches script-loaded?)))
|
||||
|
||||
((string=? (car switch) "+lp")
|
||||
(lib-dirs-prepend! (cdr switch))
|
||||
|
|
Loading…
Reference in New Issue