Hello,
Михаил Бахтерев <[email protected]> skribis:
> (let* ((fn (current-filename))
> (dir (if (string? fn) (dirname fn) "."))
> (lib (if (string? fn) (string-append (dirname dir) "/lib") "../lib")))
> (add-to-load-path lib)
> (add-to-load-path dir))
I think the crux is that you’d like this code to run both at
macro-expansion time and at run time. To do that, you need to enclose
it in ‘eval-when’ (info "(guile) Eval When"):
(eval-when (expand load eval)
(let …
(add-to-load-path …)
…))
(Note that ‘add-to-load-path’ actually does this, but only if the
argument is a literal string.)
HTH!
Ludo’.