+1998-06-19 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
+
+ * boot-9.scm (load-module): When loading files from within files
+ themselves being loaded: Use the directory path of the file being
+ loaded as root for relative filenames. (After suggestion by
+ Steven G. Johnson.)
+
1998-06-15 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
* emacs.scm (emacs-load): New feature: Eval in specified module.
(define basic-load load)
-(define (load-module . args)
- (save-module-excursion (lambda () (apply basic-load args))))
+(define (load-module filename)
+ (save-module-excursion
+ (lambda ()
+ (let ((oldname (and (current-load-port)
+ (port-filename (current-load-port)))))
+ (basic-load (if (and oldname
+ (> (string-length filename) 0)
+ (not (char=? (string-ref filename 0) #\/))
+ (not (string=? (dirname oldname) ".")))
+ (string-append (dirname oldname) "/" filename)
+ filename))))))
\f
(define load load-module)
-;(define (load . args)
-; (start-stack 'load-stack (apply load-module args)))
\f