]> gitweb.factorcode.org Git - factor.git/commitdiff
prettyprinter fix
authorSlava Pestov <slava@factorcode.org>
Mon, 5 Sep 2005 22:00:20 +0000 (22:00 +0000)
committerSlava Pestov <slava@factorcode.org>
Mon, 5 Sep 2005 22:00:20 +0000 (22:00 +0000)
TODO.FACTOR.txt
library/syntax/prettyprint.factor

index d8296ea151b883a92ebbc2cb966b0021c851eb6a..dba004b9870f4920252ac4b7d761953793f6ebbd 100644 (file)
@@ -1,5 +1,3 @@
-- "html" words . ==> fails\r
-\r
 + ui:\r
 \r
 - fix up the min thumb size hack\r
@@ -66,6 +64,8 @@
 \r
 + kernel:\r
 \r
+- better handling of random arrangements of html words when\r
+  prettyprinting\r
 - friendlier .factor-rc load error handling\r
 - reader syntax for arrays, byte arrays, displaced aliens\r
 - out of memory error when printing global namespace\r
index 1bf739f9aaeadd6d54c090b7eaee0553e22684e9..4aa717e0da06bd78d9ace2ba40e1f50a6f7f1e1e 100644 (file)
@@ -308,12 +308,11 @@ M: wrapper pprint* ( wrapper -- )
         wrapped 1vector \ W[ \ ]W pprint-sequence
     ] ifte ;
 
-: with-pprint ( quot -- )
+: pprint ( object -- )
     [
-        <pprinter> pprinter set call pprinter get do-pprint
-    ] with-scope ; inline
-
-: pprint ( object -- ) [ pprint* ] with-pprint ;
+        <pprinter> pprinter set pprint* end-blocks
+        pprinter get do-pprint
+    ] with-scope ;
 
 : unparse ( object -- str ) [ pprint ] string-out ;
 
@@ -347,12 +346,12 @@ M: wrapper pprint* ( wrapper -- )
 
 : define-open
     #! The word will be pretty-printed as a block opener.
-    #! Examples are [ { {{ << and so on.
+    #! Examples are [ { {{ [[ << and so on.
     [ <block ] "pprint-after-hook" set-word-prop ;
 
 : define-close ( word -- )
     #! The word will be pretty-printed as a block closer.
-    #! Examples are ] } }} ]] and so on.
+    #! Examples are ] } }} ]] >> and so on.
     [ block> ] "pprint-before-hook" set-word-prop ;
 
 {