]> gitweb.factorcode.org Git - factor.git/commitdiff
prettyprint: a bit more cleanup.
authorJohn Benediktsson <mrjbq7@gmail.com>
Thu, 11 Dec 2014 16:02:45 +0000 (08:02 -0800)
committerJohn Benediktsson <mrjbq7@gmail.com>
Thu, 11 Dec 2014 16:02:45 +0000 (08:02 -0800)
basis/prettyprint/sections/sections-docs.factor
basis/prettyprint/sections/sections.factor

index b645fc0e8ae8da84b717cd8a1a5d1207f170bdeb..54384d9dda4021b29e3e1a6f0329994471ec81c4 100644 (file)
@@ -154,7 +154,7 @@ HELP: empty-block?
 { $values { "block" block } { "?" boolean } }
 { $description "Tests if the block has no child sections." } ;
 
-HELP: if-nonempty
+HELP: unless-empty-block
 { $values { "block" block } { "quot" { $quotation ( block -- ) } } }
 { $description "If the block has child sections, calls the quotation, otherwise does nothing." } ;
 
index 48175a945c52ba9c29d357c5dae13fbeeaffa229..8cd172bffef73066006491859403da3e0e76afd4 100644 (file)
@@ -305,7 +305,7 @@ M: colon unindent-first-line? drop t ;
 
 ! Long section layout algorithm
 : chop-break ( seq -- seq )
-    dup last line-break? [ but-last-slice chop-break ] when ;
+    [ dup last line-break? ] [ but-last-slice ] while ;
 
 SYMBOL: prev
 SYMBOL: next
@@ -314,7 +314,7 @@ SYMBOL: next
 
 : split-before ( section -- )
     {
-        [ start-group?>> prev get [ end-group?>> ] [ t ] if* and ]
+        [ start-group?>> prev get [ end-group?>> and ] when* ]
         [ flow? prev get flow? not and ]
     } 1|| split-groups ;