[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: *package* and printing



At 18:01 2/21/93 -0500, Steve Strassmann wrote:
> >Date: Fri, 19 Feb 93 19:28:52 EST
> >From: cfry@MIT.EDU (Christopher Fry)
> >To: info-mcl@cambridge.apple.com
> >Subject: *package* and printing
> >
> >I've got an application that uses 1 package "oval" throughout for
> >all source code files.
> >I want the listener to be in this package when the program is
> >loaded so I eval
> >(setq *package* (find-package 'oval)) in one of the source code files.
> >
>
>For the behavior you want, you should probably use this instead, after
>loading your system:
>
>(eval-enqueue '(in-package oval))
>
>Trying to set *package* yourself is generally a bad idea.

The reason for this is that LOAD binds *PACKAGE* to itself around
loading a file. This limits the effect of a SETQ *PACKAGE* to the
dynamic extent of the LOAD.

Hence, the EVAL-ENQUEUE method that Straz suggested is the way to go.