Change prompt to something we can copy/paste back into the Factor repl. Add auto-use word. Fixes #301.

db4
Doug Coleman 2011-10-29 00:08:35 -07:00
parent aa7f22edc0
commit b43c069b81
2 changed files with 4 additions and 2 deletions

View File

@ -12,8 +12,8 @@ GENERIC: stream-read-quot ( stream -- quot/f )
GENERIC# prompt. 1 ( stream prompt -- )
: prompt ( -- str )
manifest get current-vocab>> [ name>> ] [ "" ] if*
auto-use? get [ " - auto" append ] when "( " " )" surround ;
manifest get current-vocab>> [ name>> "IN: " prepend ] [ "" ] if*
auto-use? get [ " auto-use" append ] when ;
M: object prompt.
nip H{ { background T{ rgba f 1 0.7 0.7 1 } } } format bl

View File

@ -22,6 +22,8 @@ M: parsing-word stack-effect drop ( parsed -- parsed ) ;
SYMBOL: auto-use?
: auto-use ( -- ) auto-use? on ;
: no-word-restarted ( restart-value -- word )
dup word? [
dup vocabulary>>