Subject: [clisp-list] Symbol Collision with CLX

From: "David Reiss" <[email-masked]>
Date: Thu Jun 19 15:02:17 2003

If you're interested in my disclaimer, it is at the bottom. I'd like to be
able to use CLX without prefixing all functions with xlib:, so it seemed
like a good idea to start my file with (use-package 'xlib), but this
caused a name conflict on the symbol "char-width" which is a function in
both the common-lisp-user package and xlib.  My first idea was to unintern
it from c-l-user, but (unintern 'char-width) simply returns nil.  I also
tried wrapping use-package in an ignore-errors, but this did not properly
import the xlib symbols.  The most obvious solutions are to prefix every
xlib function with xlib: or to list every function that I use in an
import.  Obviously, neither of these is overly appealing to me.  Any
ideas?  Thanks a lot.

--David

P.S.: Disclaimer: I'm sure this question has been answered before, but I
swear to you that searching google and gmane for clisp clx char width
turned up nothing.  Sorry to waste your time.

---

From: Sam Steingold <[email-masked]>
Date: Thu Jun 19 15:42:01 2003

> * In message <[email-masked]>
> * On the subject of "[clisp-list] Symbol Collision with CLX"
> * Sent on Thu, 19 Jun 2003 14:49:05 -0700
> * Honorable "David Reiss" <[email-masked]> writes:
>
> I'd like to be able to use CLX without prefixing all functions with
> xlib:, so it seemed like a good idea to start my file with
> (use-package 'xlib), but this caused a name conflict on the symbol
> "char-width" which is a function in both the common-lisp-user package
> and xlib.  My first idea was to unintern it from c-l-user, but
> (unintern 'char-width) simply returns nil.  I also tried wrapping
> use-package in an ignore-errors, but this did not properly import the
> xlib symbols.  The most obvious solutions are to prefix every xlib
> function with xlib: or to list every function that I use in an import.
> Obviously, neither of these is overly appealing to me.  Any ideas?

SHADOWING-IMPORT is your friend:

(shadowing-import 'xlib:char-width)
(use-package "XLIB")

good luck.

-- 
Sam Steingold (http://www.podval.org/~sds) running RedHat9 GNU/Linux
<http://www.camera.org> <http://www.iris.org.il> <http://www.memri.org/>
<http://www.mideasttruth.com/> <http://www.palestine-central.com/links.html>
Cannot handle the fatal error due to a fatal error in the fatal error handler.