From 62365b40d3b1f916a54b5f60d28c8fa12e207690 Mon Sep 17 00:00:00 2001 From: eknauel Date: Tue, 27 Sep 2005 16:35:49 +0000 Subject: [PATCH] Add ,reload-package part of darcs patch Thu Sep 22 18:58:17 EEST 2005 Martin Gasbichler --- scheme/nuit-packages.scm | 5 +++++ scheme/scheme-commands.scm | 10 ++++++++++ 2 files changed, 15 insertions(+) diff --git a/scheme/nuit-packages.scm b/scheme/nuit-packages.scm index 780f687..723edb3 100644 --- a/scheme/nuit-packages.scm +++ b/scheme/nuit-packages.scm @@ -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) diff --git a/scheme/scheme-commands.scm b/scheme/scheme-commands.scm index 58dcdbd..a84b472 100644 --- a/scheme/scheme-commands.scm +++ b/scheme/scheme-commands.scm @@ -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))))