From: Chris Hanson Date: Tue, 3 Oct 1995 21:12:37 +0000 (+0000) Subject: Make sure that the value from GROUP-INSERT-FILE! is returned by X-Git-Tag: 20090517-FFI~5921 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=6dd75cc6d46d4198739a19e6d9b19e06249b2c1f;p=mit-scheme.git Make sure that the value from GROUP-INSERT-FILE! is returned by %INSERT-FILE. --- 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) "...")