]> gitweb.factorcode.org Git - factor.git/commitdiff
see: use with-variables to start a new scope in synopsis
authorJohn Benediktsson <mrjbq7@gmail.com>
Wed, 12 Jan 2022 23:43:46 +0000 (15:43 -0800)
committerJohn Benediktsson <mrjbq7@gmail.com>
Wed, 12 Jan 2022 23:43:46 +0000 (15:43 -0800)
basis/see/see.factor

index b07dfb3e81b23eaaae9924ad90f95495ae6fcf87..cd4e30e00659066ed1667ec3dfe6434a63166a0d 100644 (file)
@@ -18,12 +18,13 @@ GENERIC: see* ( defspec -- )
 : see ( defspec -- ) see* nl ;
 
 : synopsis ( defspec -- str )
-    [
-        string-limit? off
-        0 margin namespaces:set
-        1 line-limit namespaces:set
-        [ synopsis* ] with-in
-    ] with-string-writer ;
+    H{
+        { string-limit? f }
+        { margin 0 }
+        { line-limit 1 }
+    } [
+        [ [ synopsis* ] with-in ] with-string-writer
+    ] with-variables ;
 
 : definer. ( defspec -- )
     definer drop pprint-word ;