]> gitweb.factorcode.org Git - factor.git/commitdiff
help: don't make word help create global boxes.
authorJohn Benediktsson <mrjbq7@gmail.com>
Fri, 20 Jul 2012 19:00:47 +0000 (12:00 -0700)
committerJohn Benediktsson <mrjbq7@gmail.com>
Fri, 20 Jul 2012 19:00:47 +0000 (12:00 -0700)
basis/help/help.factor
core/namespaces/namespaces.factor

index 2140e71f42b83e602b86fd61fc9645772a42947b..038fc162ee104e11c3a82cc9950d6b2c194dd019 100644 (file)
@@ -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 ;
index 55d2f6cca09f3c640615d9e8448a720e40f7febf..7367855e9f2bab382c914f27d0146f02c106c089 100644 (file)
@@ -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