8.12 Using Lisp-specific commands
in-packagecommand at the top of a file when it is first read in, this is taken to specify the primary package; otherwise it is taken to be
NIL. If the primary package has not already been seen by the environment, you are prompted for its creation. The primary package is shown in the message line at the bottom of the editor window.
When evaluating parts of the current buffer (as opposed to all of it), the environment ignores the primary package of the buffer and tries to find the current package within the section of code which is being evaluated. This is done so that any occurrences of
in-package in the buffer (other than on the first line) can be allowed for -- if the current package was always assumed to be the primary package of the current buffer, many sections of code would evaluate wrongly.
This means that you do not have to worry about setting the package explicitly in the listener before evaluating part of a buffer.
Generated with Harlequin WebMaker