It is difficult to find an appropriate title because I do not understand why I have the following issue.
When I require
my package, I would like to assign a specific function according to some packages. The idea is to set a variable as follow:
(cond ((find-package 'foo) (setf *special-function* #'foo:foo-function))
((find-package 'bar) (setf *special-function* #'bar:bar-function))
(t (warn "The package FOO or BAR is required to enable the special function.")))
Then, the evaluation of this piece of code returns:
There is no package named "FOO"
with CCL
Package FOO does not exist
with SBCL
The main reason I want to do that is that it exists different packages which provide the same function, and I want to let the user be free to make its own choice by loading the package FOO or BAR (with a preference according to the order in the condition clauses).