'load from same directory as parent script

Started by iho, May 13, 2015, 01:59:25 AM

Previous topic - Next topic

iho

Is it possible to let 'load load from the current directory, or parent script directory, respectively?



Imagine this layout



/dir/settings/settings.lsp

/dir/main.lsp

/dir/sub.lsp

/dir/settings.lsp



main.lsp:

(load "sub.lsp") ; should be loaded from the same directory as settings

(load "settings.lsp") ; should be loaded from the current directory



So, I call newlisp from both dirs



$ newlisp ../main.lsp

$ newlisp main.lsp