Save and restore the current package for -le and -lel.

This commit is contained in:
mainzelm 2004-03-15 15:39:21 +00:00
parent 8b334402ae
commit 05e38a42da
1 changed files with 9 additions and 5 deletions

View File

@ -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))