diff --git a/collects/drracket/private/rep.rkt b/collects/drracket/private/rep.rkt index fc50383841..b80e5c2f44 100644 --- a/collects/drracket/private/rep.rkt +++ b/collects/drracket/private/rep.rkt @@ -999,13 +999,13 @@ TODO (let ([pred (send lang get-language-info 'drracket:submit-predicate - (λ (editor prompt-position) - (and (only-whitespace-after-insertion-point) + (λ (port only-whitespace-afterwards?) + (and only-whitespace-afterwards? (submit-predicate this prompt-position))))]) (pred ;; no good! giving away the farm here. need to hand over a proxy that is limited to just read access - this - prompt-position))] + (open-input-text-editor this prompt-position) + (only-whitespace-after-insertion-point)))] [else (and (only-whitespace-after-insertion-point) (submit-predicate this prompt-position))]))))) diff --git a/collects/scribblings/tools/tools.scrbl b/collects/scribblings/tools/tools.scrbl index a96b45fd75..6a19bb0075 100644 --- a/collects/scribblings/tools/tools.scrbl +++ b/collects/scribblings/tools/tools.scrbl @@ -473,12 +473,14 @@ if an expression in the interactions window is ready to be submitted to the evaluator (when the user types return). The info procedure is passed @racket['drracket:submit-predicate] and should return a function with this contract: -@racketblock[(-> (is-a?/c text%) - number? +@racketblock[(-> input-port? + boolean? boolean?)] -This function is called with the interactions window's editor object -the first position in the editor after the prompt and should return -a boolean indicating if the expression should be evaluated. +This function's first argument is a port that contains the interactions window's +data, starting from the prompt position to the end of the editor. +The second argument is a boolean indicating if the insertion point is +followed only by whitespace. The results should be a +boolean indicating if the expression should be evaluated. This function is called in sandbox, but with no filesystem or networking limits.