prettyprinter fix

cvs
Slava Pestov 2005-09-05 22:00:20 +00:00
parent 8d1e921028
commit 93b15a118f
2 changed files with 8 additions and 9 deletions

View File

@ -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

View 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 ;
{