Add ,reload-package

part of darcs patch Thu Sep 22 18:58:17 EEST 2005  Martin Gasbichler <gasbichl@informatik.uni-tuebingen.de>
This commit is contained in:
eknauel 2005-09-27 16:35:49 +00:00
parent 1d2a36c982
commit 62365b40d3
2 changed files with 15 additions and 0 deletions

View File

@ -518,6 +518,11 @@
environments
package-commands-internal
package-mutation
ensures-loaded
(subset packages (structure-package))
(subset packages-internal
(package-unstable?
set-package-loaded?!))
inspection-objects
eval-environment)

View File

@ -29,6 +29,16 @@
",inspect requires an argument"
(make-inspection-object
(eval-string (string-join args)))))
((reload-package)
(if (null? args)
",reload-package requires an argument"
(let ((s (get-structure (string->symbol (car args)))))
(if (not (package-unstable? (structure-package s)))
"read-only structure"
(begin
(set-package-loaded?! (structure-package s) #f)
(ensure-loaded s)
"reloaded package")))))
((exit)
(exit))
(else (error "unknwon scheme command" command))))