User Tools


Function UNINTERN

Syntax

  • unintern symbol &optional packagegeneralized-boolean ====Arguments and Values==== * symbol - a symbol. * package - a package designator. The default is the current package. * generalized-boolean - a generalized boolean. ====Description==== unintern removes symbol from package. If symbol is present in package, it is removed from package and also from package's shadowing symbols list if it is present there. If package is the home package for symbol, symbol is made to have no home package. Symbol may continue to be accessible in package by inheritance. Use of unintern can result in a symbol that has no recorded home package, but that in fact is accessible in some package. Common Lisp does not check for this pathological case, and such symbols are always printed preceded by #:. unintern returns true if it removes symbol, and nil otherwise. ====Examples==== <blockquote> (in-package "COMMON-LISP-USER") → #<PACKAGE "COMMON-LISP-USER"> (defparameter *temps-unpack* (intern "UNPACK" (make-package 'temp))) → TEMP::UNPACK (unintern *temps-unpack* 'temp) → T (find-symbol "UNPACK" 'temp) → NIL, NIL *temps-unpack* → #:UNPACK </blockquote> ====Side Effects==== unintern changes the state of the package system in such a way that the consistency rules do not hold across the change. ====Affected By==== Current state of the package system. ====Exceptional Situations==== Giving a shadowing symbol to unintern can uncover a name conflict that had previously been resolved by the shadowing. If package A uses packages B and C, A contains a shadowing symbol x, and B and C each contain external symbols named x, then removing the shadowing symbol x from A will reveal a name conflict between b:x and c:x if those two symbols are distinct. In this case unintern will signal an error. ====See Also==== * {\secref\PackageConcepts} ====Notes==== None. \issue{PACKAGE-FUNCTION-CONSISTENCY:MORE-PERMISSIVE}