Function: COMMON-LISP:FIND-PACKAGE¶
If PACKAGE-DESIGNATOR is a package, it is returned. Otherwise PACKAGE-DESIGNATOR must be a string designator, in which case the package it names is located and returned.
As an SBCL extension, the current package may affect the way a package name is resolved: if the current package has local nicknames specified, package names matching those are resolved to the packages associated with them instead.
Example:
(defpackage :a) (defpackage :example (:use :cl) (:local-nicknames (:x :a))) (let ((package (find-package :example))) (find-package :x)) => #
See also: ADD-PACKAGE-LOCAL-NICKNAME, PACKAGE-LOCAL-NICKNAMES, REMOVE-PACKAGE-LOCAL-NICKNAME, and the DEFPACKAGE option :LOCAL-NICKNAMES.
Lambda list¶
(sb-kernel:package-designator)