File: load-package.scm

package info (click to toggle)
scsh 0.5.1-2
  • links: PTS
  • area: non-free
  • in suites: potato, slink
  • size: 6,540 kB
  • ctags: 8,656
  • sloc: lisp: 39,346; ansic: 13,466; sh: 1,669; makefile: 624
file content (26 lines) | stat: -rw-r--r-- 872 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
; Copyright (c) 1993, 1994 Richard Kelsey and Jonathan Rees.  See file COPYING.

; Added really-ensure-loaded proc, which gives you noise control.
; 	-Olin 6/95.

(define (ensure-loaded . structs)		; S48 default is noisily.
  (apply really-ensure-loaded
	 (current-output-port)	; Should this be error port?
	 structs))

(define (really-ensure-loaded noise . structs)
  (really-scan-structures structs noise
			  (lambda (p) (not (package-loaded? p)))
    (lambda (stuff p)  ;stuff = pair (file . (node1 node2 ...))
      (really-noting-undefined-variables p noise
        (lambda ()
	  (with-interaction-environment p
	    (lambda ()
	      (for-each (lambda (filename+scanned-forms)
			  (really-eval-scanned-forms
			      (cdr filename+scanned-forms)
			      p
			      (car filename+scanned-forms)
			      noise))
			stuff)
	      (set-package-loaded?! p #t))))))))