Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!zaphod.mps.ohio-state.edu!rpi!bu.edu!m2c!umvlsi!dime!gallagher From: Gallagher@cs.umass.edu (Kevin Gallagher) Newsgroups: comp.lang.lisp Subject: Re: stupid package question Message-ID: <26205@dime.cs.umass.edu> Date: 7 Feb 91 01:54:46 GMT References: <6026@rex.cs.tulane.edu> Sender: news@dime.cs.umass.edu Reply-To: Gallagher@cs.umass.edu Organization: Computer Science, University of Massachusetts, Amherst, MA Lines: 32 > Is there a correct way to do the following in a file? > 1) make a package, P > 2) load a system into this package > 3) set some parameters of the system (symbols in the package) The best thing to do is to create a separate file (in package "P") to do the third step. This is the cleanest and least likely to cause you problems later on. If you only have a few variables that you want to set you can do something like: ;; This is exactly the same as (SETF P::*PARAMETER-ONE* 35) ;; except that package P need not need not exist when this ;; form is read. (setf (symbol-value (intern "*PARAMETER-ONE*" "P")) 35) It's a bit ugly, and, generally, you should avoid using intern unless you *really* need it. This is the sort of situation where you need it. Also, not all lisps allow a package name as the second argument to intern, they require the actual package. In those cases you must do: (setf (symbol-value (intern "*PARAMETER-ONE*" (find-package "P"))) 35) Which is even more opaque. Kevin Gallagher