]> gitweb.factorcode.org Git - factor.git/commitdiff
prettyprinter fix
authorSlava Pestov <slava@factorcode.org>
Tue, 6 Sep 2005 00:36:10 +0000 (00:36 +0000)
committerSlava Pestov <slava@factorcode.org>
Tue, 6 Sep 2005 00:36:10 +0000 (00:36 +0000)
library/syntax/prettyprint.factor

index 4aa717e0da06bd78d9ace2ba40e1f50a6f7f1e1e..7c31a6a0a9ee4b61c6baee0cbad62235b0cfe71a 100644 (file)
@@ -308,11 +308,13 @@ M: wrapper pprint* ( wrapper -- )
         wrapped 1vector \ W[ \ ]W pprint-sequence
     ] ifte ;
 
-: pprint ( object -- )
+: with-pprint ( quot -- )
     [
-        <pprinter> pprinter set pprint* end-blocks
+        <pprinter> pprinter set pprint* end-block
         pprinter get do-pprint
-    ] with-scope ;
+    ] with-scope ; inline
+
+: pprint ( object -- ) [ pprint* ] with-pprint ;
 
 : unparse ( object -- str ) [ pprint ] string-out ;