4.7 Using Lisp-specific commands

4.7.8 Packages

Each buffer has a package associated with it, known as the primary package. If there is an in-package command 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. 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 most appropriate package for the region to be evaluated. This is then set to be the current package. 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 primary package was assumed to be the current package, 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.


FreeLisp User's Guide - 5 FEB 1996

Generated with Harlequin WebMaker