]> gitweb.factorcode.org Git - factor.git/blobdiff - basis/prettyprint/sections/sections.factor
Resolved merge.
[factor.git] / basis / prettyprint / sections / sections.factor
index b4eb40757d7d974bab75d85a201a38fe70f7564e..0e0c7afb82ad0041c9a4e370f665dfeabed0f2e0 100644 (file)
@@ -153,7 +153,7 @@ TUPLE: block < section sections ;
 : <block> ( style -- block )
     block new-block ;
 
-: pprinter-block ( -- block ) pprinter-stack get peek ;
+: pprinter-block ( -- block ) pprinter-stack get last ;
 
 : add-section ( section -- )
     pprinter-block sections>> push ;
@@ -292,7 +292,7 @@ M: colon unindent-first-line? drop t ;
 
 ! Long section layout algorithm
 : chop-break ( seq -- seq )
-    dup peek line-break? [ but-last-slice chop-break ] when ;
+    dup last line-break? [ but-last-slice chop-break ] when ;
 
 SYMBOL: prev
 SYMBOL: next
@@ -317,7 +317,7 @@ SYMBOL: next
     ] { } make { t } split harvest ;
 
 : break-group? ( seq -- ? )
-    [ first section-fits? ] [ peek section-fits? not ] bi and ;
+    [ first section-fits? ] [ last section-fits? not ] bi and ;
 
 : ?break-group ( seq -- )
     dup break-group? [ first <fresh-line ] [ drop ] if ;
@@ -355,4 +355,4 @@ M: block long-section ( block -- )
     ] with-scope ; inline
 
 : with-pprint ( obj quot -- )
-    make-pprint drop do-pprint ; inline
\ No newline at end of file
+    make-pprint drop do-pprint ; inline