Your code is fine (I would use defvar
instead of declaim
special
though).
You can bind any symbol, it does not matter which package it resides in.
You just need to make sure you bind the symbol you need to bind and not something else.
E.g., since you are not exporting a::*a-sp-v*
from a
, your b-test
binds b::*a-sp-v*
rather than a::*a-sp-v*
.
If you replace *a-sp-v*
with a::*a-sp-v*
in b-test
, it should work.
Alternatively, you can add #:*a-sp-v*
to the :export
section in (defpackage A ...)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…