From: Chris Hanson Date: Wed, 24 Apr 1996 02:45:38 +0000 (+0000) Subject: Change synchronous-process code to use line translation that is X-Git-Tag: 20090517-FFI~5578 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=36c0bbda146120ac5849dd909bb87bcb35a60569;p=mit-scheme.git Change synchronous-process code to use line translation that is appropriate for the file associated with the process buffer, if any. This is necessary to get newline translation correct for compressed files. --- diff --git a/v7/src/edwin/process.scm b/v7/src/edwin/process.scm index b5719feaa..916abfa9e 100644 --- a/v7/src/edwin/process.scm +++ b/v7/src/edwin/process.scm @@ -1,8 +1,8 @@ ;;; -*-Scheme-*- ;;; -;;; $Id: process.scm,v 1.38 1995/09/13 23:01:03 cph Exp $ +;;; $Id: process.scm,v 1.39 1996/04/24 02:45:38 cph Exp $ ;;; -;;; Copyright (c) 1991-95 Massachusetts Institute of Technology +;;; Copyright (c) 1991-96 Massachusetts Institute of Technology ;;; ;;; This material was developed by the Scheme project at the ;;; Massachusetts Institute of Technology, Department of @@ -585,15 +585,26 @@ after the listing is made.)" ;; Buffers that disable translation should have it disabled for ;; subprocess I/O as well as normal file I/O, since subprocesses are ;; used for reading and writing compressed files and such. - (subprocess-i/o-port process - (and (or (not output-mark) - (ref-variable translate-file-data-on-input - output-mark)) - 'DEFAULT) - (and (or (not input-region) - (ref-variable translate-file-data-on-output - (region-start input-region))) - 'DEFAULT)) + (let ((mark-translation + (lambda (mark) + (let ((pathname + (let ((buffer (mark-buffer mark))) + (and buffer + (buffer-pathname buffer))))) + (if pathname + (pathname-newline-translation pathname) + 'DEFAULT))))) + (subprocess-i/o-port + process + (if output-mark + (and (ref-variable translate-file-data-on-output output-mark) + (mark-translation output-mark)) + 'DEFAULT) + (if input-region + (let ((mark (region-start input-region))) + (and (ref-variable translate-file-data-on-input mark) + (mark-translation mark))) + 'DEFAULT))) (if input-region (call-with-protected-continuation (lambda (continuation)