Page 1 of 1

'load from same directory as parent script

PostPosted: Wed May 13, 2015 8:59 am
by 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