newLISP Fan Club

Forum => newLISP in the real world => Topic started by: iho on May 13, 2015, 01:59:25 AM

Title: 'load from same directory as parent script
Post by: iho on May 13, 2015, 01:59:25 AM
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