(and (not (null? windows))
(apply min (map window-x-size windows)))))))
-(define (operation/write-result port expression value hash-number environment)
+(define (operation/write-result port expression value hash-number)
(let ((buffer (port/buffer port))
(other-buffer?
(memq (operation/current-expression-context port expression)
(and (ref-variable enable-transcript-buffer buffer)
(transcript-buffer)))
(begin
- (default/write-result port expression value hash-number environment)
+ (default/write-result port expression value hash-number)
(if (and other-buffer? (not (mark-visible? (port/mark port))))
(transcript-write value #f))))))
\f
;;;; Miscellaneous Hooks
-(define (emacs/write-result port expression object hash-number environment)
+(define (emacs/write-result port expression object hash-number)
expression
(cond ((undefined-value? object)
(transmit-signal-with-argument port #\v ""))
port #\v
(call-with-output-string
(lambda (port)
- (write object port environment)))))))
+ (write object port)))))))
(define (emacs/error-decision repl condition)
condition
with-repl-eval-boundary
repl))
-(define (repl-write value s-expression #!optional environment repl)
- (receive (environment repl) (optional-er environment repl 'repl-write)
- (hook/repl-write value s-expression environment repl)))
+(define (repl-write value s-expression #!optional repl)
+ (hook/repl-write value
+ s-expression
+ (if (default-object? repl)
+ (nearest-repl)
+ (begin
+ (guarantee repl? repl 'repl-write)
+ repl))))
(define hook/repl-write)
-(define (default/repl-write object s-expression environment repl)
+(define (default/repl-write object s-expression repl)
(port/write-result (cmdl/port repl)
s-expression
object
(object-pointer? object)
(not (interned-symbol? object))
(not (number? object))
- (hash-object object))
- environment))
+ (hash-object object))))
(define (repl-eval/write s-expression #!optional environment repl)
(receive (environment repl) (optional-er environment repl 'repl-eval/write)
(define (%repl-eval/write s-expression environment repl)
(hook/repl-write (%repl-eval s-expression environment repl)
s-expression
- environment
repl))
(define (optional-er environment repl caller)
(let ((value (repl-eval sexp socket)))
(call-with-output-string
(lambda (port)
- (port/write-result port sexp value (hash-object value) (buffer-env))
+ (port/write-result port sexp value (hash-object value))
(if nl? (newline port))))))
(define (for-each-sexp procedure string)
\f
;;;; Miscellaneous Hooks
-(define (port/write-result port expression value hash-number
- #!optional environment)
- (let ((operation (textual-port-operation port 'write-result))
- (environment
- (if (default-object? environment)
- (nearest-repl/environment)
- (guarantee environment? environment 'port/write-result))))
+(define (port/write-result port expression value hash-number)
+ (let ((operation (textual-port-operation port 'write-result)))
(if operation
- (operation port expression value hash-number environment)
- (default/write-result port expression value hash-number environment))))
+ (operation port expression value hash-number)
+ (default/write-result port expression value hash-number))))
-(define (default/write-result port expression object hash-number environment)
+(define (default/write-result port expression object hash-number)
expression
(if (not (nearest-cmdl/batch-mode?))
(with-output-port-terminal-mode port 'cooked
(if hash-number
(begin
(write-string " " port)
- (write hash-number port environment)))
+ (write hash-number port)))
(write-string ": " port)
- (write object port environment)))))))
+ (write object port)))))))
(define write-result:undefined-value-is-special? true)