From: Kaz Kylheku
Subject: Substructure-sharing in DEFPACKAGE.
Date: 
Message-ID: <20081024175306.547@gmail.com>
What does everyone think of this:

(defpackage :p
  (:use :cl)
  (:shadow . #=(cons car cdr))
  (:export . #1#))

I.e. export exactly those symbols which are shadowed.

From: Pascal Bourguignon
Subject: Re: Substructure-sharing in DEFPACKAGE.
Date: 
Message-ID: <4902fef3$0$18785$426a34cc@news.free.fr>
Kaz Kylheku wrote:
> What does everyone think of this:
> 
> (defpackage :p
>   (:use :cl)
>   (:shadow . #=(cons car cdr))
>   (:export . #1#))
> 
> I.e. export exactly those symbols which are shadowed.

It's ok.  As long as you don't feed EVAL with circular structures, it 
should behave. (In any case, I'd shadow symbol names, instead of symbols 
that would need to be interned in the current package first...).

-- 
__Pascal Bourguignon__
http://www.informatimago.com
From: budden
Subject: Re: Substructure-sharing in DEFPACKAGE.
Date: 
Message-ID: <4a486ea8-3da2-4636-9dc4-d12fa1be6e39@p59g2000hsd.googlegroups.com>
>(defpackage :p
>  (:use :cl)
>  (:shadow . #=(cons car cdr))
>  (:export . #1#))

Never used the syntax. Anyway, I think (:cons :car :cdr) or even
(#:cons #:car #:cdr) would be better.
Problem is that you might need to repeat that when you use-package :p
somewhere. It is described in detail here:

http://www.tfeb.org/lisp/hax.html#CONDUITS

And a solution is suggested, too.