Pillsy <email@example.com> wrote:
| Frank Goenninger DG1SBG <dont-email...@nomail.org> wrote:
| > I currently only get the current package I am *using* the symbol
| > in.
| You can get a list of all the packages it might be defined in, and
| then see which package (if any) it's actually defined in. First check
| to see if it's an :INTERNAL or :EXTERNAL symbol of *PACKAGE*, and then
| see if it's an :EXTERNAL symbol of any of the packages that *PACKAGE*
| uses. Like so:
| (defun find-package-defining-symbol (designator)
| (let ((name (string designator)))
| (labels ((in-package-p (package)
| (nth-value 1 (find-symbol name package))))
| (if (member (in-package-p *package*) '(:external :internal))
| (find :external (package-use-list *package*) :key #'in-package-p)))))
More generally, don't forget about APROPOS-LIST.
Not applicable to the OP's problem, but can often
be useful in user-written debugging aids.
Rob Warnock <firstname.lastname@example.org>
627 26th Avenue <URL:http://rpw3.org/>
San Mateo, CA 94403 (650)572-2607