Make sure that the value from GROUP-INSERT-FILE! is returned by
authorChris Hanson <org/chris-hanson/cph>
Tue, 3 Oct 1995 21:12:37 +0000 (21:12 +0000)
committerChris Hanson <org/chris-hanson/cph>
Tue, 3 Oct 1995 21:12:37 +0000 (21:12 +0000)
%INSERT-FILE.

v7/src/edwin/fileio.scm
v7/src/edwin/unix.scm

index 9990cf30877cf7c8d74a71d6c230eb4f677f501c..d550aff9cbb0bb59a29b7dece26778365f0bc4d7 100644 (file)
@@ -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)
index 8538027b8cf03a835f0a625d3787344dcf03bb8d..61c8a7a3acea58e05cd7876b4eee1da31c871f34 100644 (file)
@@ -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) "...")