[LISPWORKS][Common Lisp HyperSpec (TM)] [Previous][Up][Next]

Variable *PACKAGE*

Value Type:

a package object.

Initial Value:

the COMMON-LISP-USER package.


Whatever package object is currently the value of *package* is referred to as the current package.


 *package* =>  #<PACKAGE "COMMON-LISP-USER">
 (make-package "SAMPLE-PACKAGE" :use '("COMMON-LISP"))
     (let ((*package* (find-package 'sample-package)))
       (setq *some-symbol* (read-from-string "just-testing"))))
 (list (symbol-package (read-from-string "just-testing"))
 (eq 'foo (intern "FOO")) =>  true
 (eq 'foo (let ((*package* (find-package 'sample-package)))
            (intern "FOO")))
=>  false

Affected By:

load, compile-file, in-package

See Also:

compile-file, in-package, load, package

Notes: None.

[Starting Points][Contents][Index][Symbols][Glossary][Issues]
Copyright 1996-2005, LispWorks Ltd. All rights reserved.