Common Lisp Package: PACKAGE-RENAMING

README:

FUNCTION

Public

CALL-WITH-EFFECTIVE-PACKAGE-RENAMINGS (PACKAGE-RENAMINGS THUNK &KEY IF-DOES-NOT-EXIST)

Call the THUNK in an dynamic environment where the PACKAGE-RENAMINGS have been effected by effect-package-renamings, and are undone in the end by the same using the reverse renamings returned by the first call.

CHECK-PACKAGE-CANDIDATE-NAMES (PACKAGE-DESIGNATOR NAMES)

Check that each of the NAMES either designates the package specified by PACKAGE-DESIGNATOR or no package at all

CHECK-SAME-PACKAGE-NAMES (NAMES)

Check that the NAMES all designate the same package

EFFECT-PACKAGE-RENAMING (OLD NEW &KEY IF-DOES-NOT-EXIST)

Effect the renaming of a package with OLD names (designator or list of designators) to NEW names (a designator or list of designators). Return the list of actual names that the package had. IF-DOES-NOT-EXIST may be NIL or ERROR.

EFFECT-PACKAGE-RENAMINGS (PACKAGE-RENAMINGS &KEY IF-DOES-NOT-EXIST)

Call effect-package-renaming on each renaming. Return a list of reverse renamings to undo the thing. IF-DOES-NOT-EXIST may be NIL or ERROR; in the former case, the reverse renaming will rename the possibly newly created package to the "old" name.

FIND-PACKAGE-FROM-NAMES (NAMES &KEY IF-DOES-NOT-EXIST)

Find the first package designated by one of the NAMES. IF-DOES-NOT-EXIST may be NIL or ERROR.

PACKAGE-NAMES (PACKAGE-DESIGNATOR)

List of the designated package's name and nicknames

MACRO

Public

WITH-EFFECTIVE-PACKAGE-RENAMINGS (PACKAGE-RENAMINGS &BODY BODY)

Evaluate the BODY in an dynamic environment where the PACKAGE-RENAMINGS have been effected by effect-package-renamings, and are undone in the end by the same using the reverse renamings returned by the first call. PACKAGE-RENAMINGS is a compile-time constant; for runtime-computed renamings, use the call-with-effective-package-renamings function.