How to make load chain properly?

Started by denis, November 18, 2012, 11:05:47 AM

Previous topic - Next topic

denis

Hi again, folks!



Tried to find the info in documentation and other forum topics but couldn't.



The question is about load function.



Say I have three files: main.lsp, lib/a.lsp, lib/b.lsp



How do I load file b.lsp into a.lsp if i load a.lsp into main.lsp?



This doesn't work:



; main.lsp:
(load "lib/a.lsp")

; a.lsp:
(load "b.lsp")


because current directory is defined by the directory where main.lsp resides, not the file being loaded.

I don't want to write absolute path as all files il lib directory can constitute a single library, and the lib directory can take arbitrary location in the local filesystem.



Is there some way to load b to a, however?