Make stack display configurable

db4
Slava Pestov 2008-11-21 18:55:14 -06:00
parent a87fb04098
commit 4d7c6fe48b
1 changed files with 8 additions and 2 deletions

View File

@ -73,9 +73,15 @@ SYMBOL: error-hook
] tabular-output
] unless-empty ;
SYMBOL: display-stacks?
t display-stacks? set-global
: stacks. ( -- )
datastack [ nl "--- Data stack:" title. stack. ] unless-empty
retainstack [ nl "--- Retain stack:" title. stack. ] unless-empty ;
display-stacks? get [
datastack [ nl "--- Data stack:" title. stack. ] unless-empty
retainstack [ nl "--- Retain stack:" title. stack. ] unless-empty
] when ;
: prompt. ( -- )
"( " in get auto-use? get [ " - auto" append ] when " )" 3append