(define (emacs/gc-start port)
(output-port/flush-output port)
- (cwb (output-port-channel port) gc-start-bytes))
+ (cwb console-output-channel gc-start-bytes))
(define (emacs/gc-finish port)
- (cwb (output-port-channel port) gc-end-bytes))
+ (declare (ignore port))
+ (cwb console-output-channel gc-end-bytes))
(define (transmit-signal port type)
- (let ((channel (output-port-channel port))
- (buffer (string->utf8 (string #\esc type))))
+ (let ((buffer (string->utf8 (string #\esc type))))
(output-port/flush-output port)
(with-absolutely-no-interrupts
(lambda ()
- (cwb channel buffer)))))
+ (cwb console-output-channel buffer)))))
(define (transmit-signal-with-argument port type string)
- (let ((channel (output-port-channel port))
- (buffer
+ (let ((buffer
(let ((builder (bytevector-builder)))
(builder (char->integer #\esc))
(builder (char->integer type))
(output-port/flush-output port)
(with-absolutely-no-interrupts
(lambda ()
- (cwb channel buffer)))))
+ (cwb console-output-channel buffer)))))
(define (cwb channel bytes)
;; This is a private copy of CHANNEL-WRITE-BLOCK that bypasses all
(define gc-start-bytes)
(define gc-end-bytes)
+(define console-output-channel)
(define vanilla-console-port-type)
(define emacs-console-port-type)
(set! gc-end-bytes
(bytevector (char->integer #\esc)
(char->integer #\e)))
+ (set! console-output-channel (output-port-channel the-console-port))
(set! vanilla-console-port-type (textual-port-type the-console-port))
(set! emacs-console-port-type
(make-textual-port-type