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:
parent
1d2a36c982
commit
62365b40d3
|
@ -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)
|
||||
|
|
|
@ -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))))
|
||||
|
|
Loading…
Reference in New Issue