From 7a615ae33b0b42d5ced3c63efb2572d4f3fd028e Mon Sep 17 00:00:00 2001 From: John Benediktsson Date: Fri, 20 Jul 2012 12:00:47 -0700 Subject: [PATCH] help: don't make word help create global boxes. --- basis/help/help.factor | 2 +- core/namespaces/namespaces.factor | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/basis/help/help.factor b/basis/help/help.factor index 2140e71f42..038fc162ee 100644 --- a/basis/help/help.factor +++ b/basis/help/help.factor @@ -69,7 +69,7 @@ M: word article-title [ \ $vocabulary swap 2array , ] [ word-help % ] [ \ $related swap 2array , ] - [ get-global [ \ $value swap 2array , ] when* ] + [ dup is-global [ get-global \ $value swap 2array , ] [ drop ] if ] [ \ $definition swap 2array , ] } cleave ] { } make ; diff --git a/core/namespaces/namespaces.factor b/core/namespaces/namespaces.factor index 55d2f6cca0..7367855e9f 100644 --- a/core/namespaces/namespaces.factor +++ b/core/namespaces/namespaces.factor @@ -47,6 +47,7 @@ PRIVATE> : set ( value variable -- ) namespace set-at ; : on ( variable -- ) t swap set ; inline : off ( variable -- ) f swap set ; inline +: is-global ( variable -- ? ) global boxes>> key? ; inline : get-global ( variable -- value ) global at ; inline : set-global ( value variable -- ) global set-at ; inline : change ( variable quot -- ) [ [ get ] keep ] dip dip set ; inline