[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Package Reference in init file
I experimented the similar problem for initialization of software.
The only solution I found was to execute a piece of code which would
test if the package is loaded before any call or to use a form of
the style:
(funcall (intern "MY-FUNCTION" 'unknow-package-at-compilation) args)
in all your code.
example:
you want to be sure that my-function is correctly loaded from
file my-file.lisp in package my-package.
(defun use-my-function (&rest args)
(if (null (packagep 'my-package))
(load "my-file.lisp"))
(funcall (intern "MY-FUNCTION" 'my-package) args))
I am not sure it is the only way to do it but it works and it is portable.
Philippe.