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

Re: IN-PACKAGE changes PACKAGE-USE-LIST



Ulrich Hoffmann <uho@informatik.uni-kiel.dbp.de> has a problem with
IN-PACKAGE:

> > (package-use-list 'user)
> (#<PACKAGE A> #<PACKAGE LISP>            ; hmm looks ok
> > (in-package 'user :use '(lisp b))	   ; extend use-list with package B
> #<PACKAGE USER>
> > (package-use-list 'user)               ; check if this was succesful
> (#<PACKAGE B> #<PACKAGE LISP>)	   ; oh no! Package A is missing

CLtL states that the "existing package is augmented to reflect any new
nicknames or new packages in the :USE list". CLISP also removes any packages
from the use list that are not specified in the :USE list argument.
(Seems more logical to me: The code after the IN-PACKAGE form may be
disturbed by an unforeseen package on the use list.)

If you have IN-PACKAGE calls for the same package but with different :USE
arguments, you should make them equal.

Bruno Haible
haible@ma2s2.mathematik.uni-karlsruhe.de