'load from same directory as parent script

Q&A's, tips, howto's
Post Reply
iho
Posts: 4
Joined: Mon Apr 13, 2015 1:22 pm

'load from same directory as parent script

Post 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

Post Reply