home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!cs.utexas.edu!sun-barr!ames!data.nas.nasa.gov!taligent!apple!apple!cambridge.apple.com!kab@cambridge.apple.com
- From: kab@cambridge.apple.com (Kim Barrett)
- Newsgroups: comp.lang.lisp.mcl
- Subject: Re: MCL 2.0 final defsys package screw
- Message-ID: <9209102206.AA05660@cambridge.apple.com>
- Date: 10 Sep 92 23:09:48 GMT
- Sender: info-mcl-request@cambridge.apple.com
- Lines: 32
- Approved: comp.lang.lisp.mcl@Cambridge.Apple.C0M
- Full-Name: Kim Barrett
- Original-To: nathan@akbar.teleos.com
- Original-Cc: info-mcl%cambridge.apple.com@apple.COM
-
- > The offending piece of code is:
- >
- > (defun ...
- >
- > (if package
- > (let ((spackage *package*))
- > (unwind-protect
- > (progn (in-package package)
- > (load path))
- > (in-package (package-name spackage))))
- > (load path))
- >
- > ...)
- >
- > I assume that the problem has to do with a change in when in-package
- > gets evaluated (presumably related to the change between CLtL1 and
- > CLtL2) and what it expects to see as its argument. Packages have
- > always seemed a little magical to me, so I was hoping someone would
- > tell me whether the following translation would have the correct
- > effect:
- >
- > (if package
- > (let ((*package* (find-package package)))
- > (load path))
- > (load path))
-
- Yes. In fact, it should have been written in that fashion to start with.
- (That business of using unwind-protect with in-package is quite yucky).
- Another (to me, clearer) way to write it is
-
- (let ((*package* (if package (find-package package) *package*)))
- (load path))
-