11.1. Introduction to Packages [sec_11-1-1]

11.1.1. Function MAKE-PACKAGE
11.1.2. Macro DEFPACKAGE
11.1.3. Function EXT:RE-EXPORT
11.1.4. Function EXT:PACKAGE-CASE-INVERTED-P
11.1.5. Function EXT:PACKAGE-CASE-SENSITIVE-P

11.1.1. Function MAKE-PACKAGE

The default value of the :USE argument is (COMMON-LISP).

MAKE-PACKAGE accepts additional keyword arguments :CASE-SENSITIVE and :CASE-INVERTED (but not :MODERN!)

11.1.2. Macro DEFPACKAGE

DEFPACKAGE accepts additional options :CASE-SENSITIVE, :CASE-INVERTED, and :MODERN.

When the package being defined already exists, it is modified as follows (and in this order):

:CASE-SENSITIVE
adjusted with (SETF EXT:PACKAGE-CASE-SENSITIVE-P) (with a warning)
:CASE-INVERTED
adjusted with (SETF EXT:PACKAGE-CASE-INVERTED-P) (with a warning)
:MODERN

if COMMON-LISP is being used, it is un-used and CS-COMMON-LISP is used instead; also, CS-COMMON-LISP is used instead of COMMON-LISP throughout the DEFPACKAGE form, e.g.,

(DEFPACKAGE "FOO"
  (:MODERN T)
  (:USE "COMMON-LISP" "EXT"))

is equivalent to

(DEFPACKAGE "FOO"
  (:CASE-SENSITIVE T)
  (:CASE-INVERTED T)
  (:USE "CS-COMMON-LISP" "EXT"))

(:MODERN NIL) reverts the effects of (:MODERN T).

:NICKNAMES
adjusted with RENAME-PACKAGE
:DOCUMENTATION
reset to the new value with (SETF DOCUMENTATION)
:SHADOW
adjusted with SHADOW
:SHADOWING-IMPORT-FROM
adjusted with SHADOWING-IMPORT
:USE
adjusted with USE-PACKAGE and UNUSE-PACKAGE
:IMPORT-FROM
adjusted with IMPORT
:INTERN
adjusted with INTERN (but not UNINTERN)
:EXPORT
adjusted with INTERN and EXPORT (but not UNEXPORT)
:SIZE
ignored

11.1.3. Function EXT:RE-EXPORT

The function (EXT:RE-EXPORT FROM-PACK TO-PACK) re-EXPORTs all external SYMBOLs from FROM-PACK also from TO-PACK, provided it already uses FROM-PACK; and SIGNALs an ERROR otherwise.

11.1.4. Function EXT:PACKAGE-CASE-INVERTED-P

Returns T if the argument is a case-inverted package. This function is SETFable, although it is probably not a good idea to change the case-inverted status of an existing package.

Returns T if the argument is a :CASE-SENSITIVE PACKAGE. This function is SETFable, although it is probably not a good idea to change the case-sensitive status of an existing package.


These notes document CLISP version 2.49Last modified: 2010-07-07