Add load/current-pathname fluid let by each load so that the binary
authorGuillermo J. Rozas <edu/mit/csail/zurich/gjr>
Sun, 5 Apr 1992 02:00:34 +0000 (02:00 +0000)
committerGuillermo J. Rozas <edu/mit/csail/zurich/gjr>
Sun, 5 Apr 1992 02:00:34 +0000 (02:00 +0000)
unpacker can grab it.

v7/src/runtime/load.scm
v8/src/runtime/load.scm

index 59d2f1c307d07285f2dab320531a6b6d9b322931..dc9320ea7aceb76a0bdfe662dec8ff6f5eec8072 100644 (file)
@@ -1,8 +1,8 @@
 #| -*-Scheme-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/load.scm,v 14.31 1991/11/26 07:06:29 cph Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/load.scm,v 14.32 1992/04/05 02:00:34 jinx Exp $
 
-Copyright (c) 1988-91 Massachusetts Institute of Technology
+Copyright (c) 1988-1992 Massachusetts Institute of Technology
 
 This material was developed by the Scheme project at the Massachusetts
 Institute of Technology, Department of Electrical Engineering and
@@ -52,6 +52,7 @@ MIT in each case. |#
 (define load/suppress-loading-message?)
 (define load/default-types)
 (define load/after-load-hooks)
+(define load/current-pathname)
 (define load/default-find-pathname-with-type)
 (define fasload/default-types)
 
@@ -128,15 +129,17 @@ MIT in each case. |#
                      (load/after-load-hooks '()))
            (let ((kernel
                   (lambda (filename last-file?)
-                    (let ((value
-                           (load/internal
-                            (find-pathname filename load/default-types)
-                            environment
-                            syntax-table
-                            purify?
-                            load-noisily?)))
-                      (cond (last-file? value)
-                            (load-noisily? (write-line value)))))))
+                    (let ((pathname
+                           (find-pathname filename load/default-types)))
+                      (fluid-let ((load/current-pathname pathname))
+                        (let ((value
+                               (load/internal pathname
+                                              environment
+                                              syntax-table
+                                              purify?
+                                              load-noisily?)))
+                          (cond (last-file? value)
+                                (load-noisily? (write-line value)))))))))
              (let ((value
                     (if (pair? filename/s)
                         (let loop ((filenames filename/s))
index f4dfa0f4247af0b4bed358a2341cf61abd59110a..b3a5b0a6e622e57c6f96e7864163d27fa32da2cd 100644 (file)
@@ -1,8 +1,8 @@
 #| -*-Scheme-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/runtime/load.scm,v 14.31 1991/11/26 07:06:29 cph Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/runtime/load.scm,v 14.32 1992/04/05 02:00:34 jinx Exp $
 
-Copyright (c) 1988-91 Massachusetts Institute of Technology
+Copyright (c) 1988-1992 Massachusetts Institute of Technology
 
 This material was developed by the Scheme project at the Massachusetts
 Institute of Technology, Department of Electrical Engineering and
@@ -52,6 +52,7 @@ MIT in each case. |#
 (define load/suppress-loading-message?)
 (define load/default-types)
 (define load/after-load-hooks)
+(define load/current-pathname)
 (define load/default-find-pathname-with-type)
 (define fasload/default-types)
 
@@ -128,15 +129,17 @@ MIT in each case. |#
                      (load/after-load-hooks '()))
            (let ((kernel
                   (lambda (filename last-file?)
-                    (let ((value
-                           (load/internal
-                            (find-pathname filename load/default-types)
-                            environment
-                            syntax-table
-                            purify?
-                            load-noisily?)))
-                      (cond (last-file? value)
-                            (load-noisily? (write-line value)))))))
+                    (let ((pathname
+                           (find-pathname filename load/default-types)))
+                      (fluid-let ((load/current-pathname pathname))
+                        (let ((value
+                               (load/internal pathname
+                                              environment
+                                              syntax-table
+                                              purify?
+                                              load-noisily?)))
+                          (cond (last-file? value)
+                                (load-noisily? (write-line value)))))))))
              (let ((value
                     (if (pair? filename/s)
                         (let loop ((filenames filename/s))