Subject: Re: simple defpackage Q
From: (Rob Warnock)
Date: Tue, 18 Feb 2003 06:09:17 -0600
Newsgroups: comp.lang.lisp
Message-ID: <>
Kenny Tilton  <> wrote:
| (defpackage cgl-window-manager
|    (:nicknames :cwm)
|    (:use CL CL-USER FLI UFFI)
|      #:HDC #:cgl-window-init))
| Well LW screamed like a stuck pig, because UFFI had a few names the same 
| as FLI. Now we're just talking about a few, so I could have typed up a 
| nice little defpackage option (shadow?) listing them if for the life of 
| me I could have figured out what to do.

Here's what I did (had to do) when using Tim Bradshaw's HTOUT macros

	(defpackage :cgi-user
	  (:use :cl :ext :htout :cgi :cgi-sql #+cmu :pg)
	  #+clisp	; conflicts with CLISP's inspector in "EXT"
	  (:shadowing-import-from :htout #:with-html-output))

From the CLHS page on DEFPACKAGE, note especially the marked[*] lines:

	The order in which the options appear in a defpackage form is
	irrelevant. The order in which they are executed is as follows: 

	1. :shadow and :shadowing-import-from. 
	2. :use. 
	3. :import-from and :intern. 
	4. :export. 

[*]==>	Shadows are established first, since they might be necessary to
[*]==>	block spurious name conflicts when the :use option is processed.
	The :use option is executed next so that :intern and :export
	options can refer to normally inherited symbols.  The :export
	option is executed last so that it can refer to symbols created
	by any of the other options; in particular, shadowing symbols
	and imported symbols can be made external. 


Rob Warnock, PP-ASEL-IA		<>
627 26th Avenue			<URL:>
San Mateo, CA 94403		(650)572-2607