From: Doug Coleman Date: Sat, 29 Oct 2011 07:08:35 +0000 (-0700) Subject: Change prompt to something we can copy/paste back into the Factor repl. Add auto... X-Git-Tag: 0.97~3695 X-Git-Url: https://gitweb.factorcode.org/gitweb.cgi?p=factor.git;a=commitdiff_plain;h=b43c069b81340ec3b64718a895ea278b99bc5f26 Change prompt to something we can copy/paste back into the Factor repl. Add auto-use word. Fixes #301. --- diff --git a/basis/listener/listener.factor b/basis/listener/listener.factor index bd47f63aa8..248e267c0a 100644 --- a/basis/listener/listener.factor +++ b/basis/listener/listener.factor @@ -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 diff --git a/core/parser/parser.factor b/core/parser/parser.factor index b31a6ef4bc..c3af80eb75 100644 --- a/core/parser/parser.factor +++ b/core/parser/parser.factor @@ -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>>