al-output-conditions port (write-char char port))) (define (put-datum port datum) (with-textual-output-conditions port (write datum port))) (define* (put-string port s #:optional start count) (with-textual-output-conditions port (cond ((not (string? s)) (assertion-violation 'put-string "expected string" s)) ((and start count) (display (substring/shared s start (+ start count)) port)) (start (display (substring/shared s start (string-length s)) port)) (else (display s port))))) ;; Defined here to be able to make use of `with-i/o-encoding-error', but ;; not exported from here, but from `(rnrs io simple)'. (define* (display object #:optional (port (current-output-port))) (with-textual-output-conditions port (guile:display object port)))