diff --git a/TODO.FACTOR.txt b/TODO.FACTOR.txt index d8296ea151..dba004b987 100644 --- a/TODO.FACTOR.txt +++ b/TODO.FACTOR.txt @@ -1,5 +1,3 @@ -- "html" words . ==> fails - + ui: - fix up the min thumb size hack @@ -66,6 +64,8 @@ + kernel: +- better handling of random arrangements of html words when + prettyprinting - friendlier .factor-rc load error handling - reader syntax for arrays, byte arrays, displaced aliens - out of memory error when printing global namespace diff --git a/library/syntax/prettyprint.factor b/library/syntax/prettyprint.factor index 1bf739f9aa..4aa717e0da 100644 --- a/library/syntax/prettyprint.factor +++ b/library/syntax/prettyprint.factor @@ -308,12 +308,11 @@ M: wrapper pprint* ( wrapper -- ) wrapped 1vector \ W[ \ ]W pprint-sequence ] ifte ; -: with-pprint ( quot -- ) +: pprint ( object -- ) [ - pprinter set call pprinter get do-pprint - ] with-scope ; inline - -: pprint ( object -- ) [ pprint* ] with-pprint ; + 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. [ > and so on. [ block> ] "pprint-before-hook" set-word-prop ; {