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

USE-PACAKGE (was Re: (unuse-package "CCL") bombs !)

In article <1991Aug8.093751.12546@ircam.fr> duthen@ircam.fr (Jacques Duthen) writes:
>I thought that "use-package" was something like:
>(defun use-package (pack-to-use &optional (pack *package*))
>  (do-external-symbols (s pack-to-use)
>     (import s pack))
>  t)

Not quite.  Before importing the symbol, it checks whether there's a symbol
with the same name in pack's shadowing symbols list.  It also arranges that
symbols that are exported by pack-to-use in the future will be imported
into pack automatically, and that shadowed symbols will be imported if the
shadowing symbol is later uninterned.

>But I have (by mistake) a local symbol "LAST-DUMP-IMAGE-P" in my
>package "RESTORE-LISP" and I try to use the package "DUMP-IMAGE"
>which exports another symbol "LAST-DUMP-IMAGE-P".
>"use-package" does *NOT* signal an error.
>As far as I remember "MACINTOSH ALLEGRO COMMON LISP 1.3.2" did signal it.
>Is it a bug from the new MCL 2.0  or is it (again) an undefined behaviour ?

Unless RESTORE-LISP::LAST-DUMP-IMAGE-P is a shadowing symbol, this is a bug.
Barry Margolin, Thinking Machines Corp.