The symbol-package function can be used to locate the original package in which a symbol is defined. Because it is possible to import symbols into other packages, it may sometimes not be clear what the origin is of a symbol being used. Here is a transcript that demonstrates the use of symbol-package. In it, we create a package, and a function in that package. We then create a second package and import the symbol corresponding to the function. Outside of either package, we can invoke the function in the second package, but symbol-package reveals that it is actually found in the first.
CL-USER> (defpackage :base (:use :common-lisp)) #<PACKAGE "BASE"> CL-USER> (in-package :base) #<PACKAGE "BASE"> BASE> (defun myfunc () (format t "hi~%")) MYFUNC BASE> (defpackage :derived (:use :common-lisp)) #<PACKAGE "DERIVED"> BASE> (in-package :derived) #<PACKAGE "DERIVED"> DERIVED> (import 'base::myfunc) T DERIVED> (myfunc) hi NIL DERIVED> (in-package :cl-user) #<PACKAGE "COMMON-LISP-USER"> CL-USER> (derived::myfunc) hi NIL CL-USER> (symbol-package 'derived::myfunc) #<PACKAGE "BASE">