loadc.scm 571 B

123456789101112131415161718192021222324
  1. ; Part of Scheme 48 1.9. See file COPYING for notices and license.
  2. ; Authors: Richard Kelsey, Jonathan Rees
  3. ; Cf. alt/config.scm
  4. (define (load-configuration filename . rest)
  5. (let ((save filename))
  6. (dynamic-wind (lambda () (set! *source-file-name* filename))
  7. (lambda ()
  8. (apply load filename rest))
  9. (lambda () (set! *source-file-name* save)))))
  10. (define (%file-name%) *source-file-name*)
  11. (define *source-file-name* "")
  12. ; ?
  13. (define-syntax structure-ref
  14. (syntax-rules ()
  15. ((structure-ref ?struct ?name)
  16. (*structure-ref ?struct '?name))))