From d0362576dfa8afa43a53c7645b80d9d3ad757b5c Mon Sep 17 00:00:00 2001 From: slava Date: Mon, 11 Dec 2006 02:33:13 +0000 Subject: [PATCH] Update docs for -quiet switch, make require respect it --- core/handbook/cli.facts | 3 ++- core/modules.factor | 9 ++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/core/handbook/cli.facts b/core/handbook/cli.facts index 80767e09f1..51deaa91d3 100644 --- a/core/handbook/cli.facts +++ b/core/handbook/cli.facts @@ -1,4 +1,4 @@ -USING: help parser shells ; +USING: help parser shells modules ; ARTICLE: "cli" "Command line usage" "Unless the " { $snippet "-no-user-init" } " command line switch is specified, The startup routine runs the " { $snippet ".factor-rc" } " file in the user's home directory, if it exists. This file can contain initialization and customization for your development environment." @@ -48,4 +48,5 @@ ARTICLE: "standard-cli-args" "General command line switches" { { $snippet "-e=" { $emphasis "code" } } { "This specifies a code snippet to evaluate. If you want Factor to exit immediately after, also specify " { $snippet "-shell=none" } "." } } { { $snippet "-shell=" { $emphasis "shell" } } { { $snippet { $emphasis "shell" } } " is either " { $link tty } ", " { $link ui } ", " { $link none } ", or the name of any other word in the " { $vocab-link "shells" } " vocabulary. This specifies the user interface to run on startup." } } { { $snippet "-no-user-init" } { "If specified, Factor will not run the " { $snippet "~/.factor-rc" } " file on startup" } } + { { $snippet "-quiet" } { "If set, " { $link run-file } " and " { $link require } " will not print load messages" } } } ; diff --git a/core/modules.factor b/core/modules.factor index e470a77d41..e4bc447cd6 100644 --- a/core/modules.factor +++ b/core/modules.factor @@ -27,9 +27,16 @@ TUPLE: module name loc directory files tests help main ; : module-files* ( module -- seq ) dup module-directory swap module-files process-files ; +: loading-module ( name -- ) + "quiet" get [ + drop + ] [ + "Loading module " write write "..." print flush + ] if ; + : load-module ( name -- ) [ - "Loading module " write dup write "..." print + dup loading-module [ dup module-def run-file ] assert-depth drop ] no-parse-hook ;