mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-04 05:50:26 +02:00
* 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.)
This commit is contained in:
parent
74d6650d3a
commit
c6775c407a
2 changed files with 18 additions and 4 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
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>
|
1998-06-15 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
|
||||||
|
|
||||||
* emacs.scm (emacs-load): New feature: Eval in specified module.
|
* emacs.scm (emacs-load): New feature: Eval in specified module.
|
||||||
|
|
|
@ -1664,8 +1664,17 @@
|
||||||
|
|
||||||
(define basic-load load)
|
(define basic-load load)
|
||||||
|
|
||||||
(define (load-module . args)
|
(define (load-module filename)
|
||||||
(save-module-excursion (lambda () (apply basic-load args))))
|
(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))))))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -2792,8 +2801,6 @@
|
||||||
|
|
||||||
|
|
||||||
(define load load-module)
|
(define load load-module)
|
||||||
;(define (load . args)
|
|
||||||
; (start-stack 'load-stack (apply load-module args)))
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue