From 6dd75cc6d46d4198739a19e6d9b19e06249b2c1f Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Tue, 3 Oct 1995 21:12:37 +0000 Subject: [PATCH] Make sure that the value from GROUP-INSERT-FILE! is returned by %INSERT-FILE. --- v7/src/edwin/fileio.scm | 7 ++++--- v7/src/edwin/unix.scm | 46 +++++++++++++++++++++-------------------- 2 files changed, 28 insertions(+), 25 deletions(-) diff --git a/v7/src/edwin/fileio.scm b/v7/src/edwin/fileio.scm index 9990cf308..d550aff9c 100644 --- a/v7/src/edwin/fileio.scm +++ b/v7/src/edwin/fileio.scm @@ -1,6 +1,6 @@ ;;; -*-Scheme-*- ;;; -;;; $Id: fileio.scm,v 1.131 1995/10/03 19:01:01 cph Exp $ +;;; $Id: fileio.scm,v 1.132 1995/10/03 21:12:25 cph Exp $ ;;; ;;; Copyright (c) 1986, 1989-95 Massachusetts Institute of Technology ;;; @@ -172,8 +172,9 @@ of the predicates is satisfied, the file is written in the usual way." (->namestring truename) "\"..."))) (temporary-message msg) - (do-it) - (temporary-message msg "done")) + (let ((value (do-it))) + (temporary-message msg "done") + value)) (do-it)))))) (define (group-insert-file! group index truename) diff --git a/v7/src/edwin/unix.scm b/v7/src/edwin/unix.scm index 8538027b8..61c8a7a3a 100644 --- a/v7/src/edwin/unix.scm +++ b/v7/src/edwin/unix.scm @@ -1,6 +1,6 @@ ;;; -*-Scheme-*- ;;; -;;; $Id: unix.scm,v 1.56 1995/10/03 19:15:54 cph Exp $ +;;; $Id: unix.scm,v 1.57 1995/10/03 21:12:37 cph Exp $ ;;; ;;; Copyright (c) 1989-95 Massachusetts Institute of Technology ;;; @@ -431,28 +431,30 @@ of the filename suffixes \".gz\" or \".Z\"." (define (read-compressed-file program pathname mark) (temporary-message "Uncompressing file " (->namestring pathname) "...") - (call-with-temporary-file-pathname - (lambda (temporary) - (if (not (equal? '(EXITED . 0) - (shell-command #f #f - (directory-pathname pathname) - #f - (string-append + (let ((value + (call-with-temporary-file-pathname + (lambda (temporary) + (if (not (equal? '(EXITED . 0) + (shell-command #f #f + (directory-pathname pathname) + #f + (string-append + program + " < " + (file-namestring pathname) + " > " + (->namestring temporary))))) + (error:file-operation pathname program - " < " - (file-namestring pathname) - " > " - (->namestring temporary))))) - (error:file-operation pathname - program - "file" - "[unknown]" - read-compressed-file - (list pathname mark))) - (group-insert-file! (mark-group mark) - (mark-index mark) - temporary))) - (append-message "done")) + "file" + "[unknown]" + read-compressed-file + (list pathname mark))) + (group-insert-file! (mark-group mark) + (mark-index mark) + temporary))))) + (append-message "done") + value)) (define (write-compressed-file program region pathname) (temporary-message "Compressing file " (->namestring pathname) "...") -- 2.25.1