From: charlieb
Subject: quick CLX packages question.
Date: 
Message-ID: <c1fkmi$1hgs5q$1@ID-208832.news.uni-berlin.de>
hi,
	I'm looking at the CLX manual and I've taken the source for the first 
part (just-say-lisp) and am trying to get it to run with cmucl. So far I 
have replaced OPEN-DISPLAY with open-clx-display which seemed to do the 
trick but there's still a problem. CMUCL is complaining that it doesn't 
know about any of the symbols in the xlibs package so I have to go 
through all the source and xlib: all the functions. There must be a 
package command that'll save me but I can't figure it out. Can you help?

Thanks
Charlieb.

From: Fred Gilham
Subject: Re: quick CLX packages question.
Date: 
Message-ID: <u7u11glc6m.fsf@snapdragon.csl.sri.com>
> There must be a package command that'll save me but I can't figure
> it out. Can you help?

Create your own package with defpackage, and then use the :use option:

(defpackage "MYPACKAGE"
  (:use "XLIB" "COMMON-LISP"))

Or do the following:

(defpackage "MYPACKAGE")

(in-package "MYPACKAGE")

(use-package "XLIB")

   ...add whatever other USE-PACKAGE invocations you need here... 


-- 
Fred Gilham                                         ······@csl.sri.com
It's not when people notice you're there that they pay attention; it's
when they notice you're *still* there.  --- Paul Graham
From: Ingvar Mattsson
Subject: Re: quick CLX packages question.
Date: 
Message-ID: <878yisshvf.fsf@gruk.tech.ensign.ftech.net>
charlieb <··@privacy.net> writes:

> hi,
> 	I'm looking at the CLX manual and I've taken the source for
> the first part (just-say-lisp) and am trying to get it to run with
> cmucl. So far I have replaced OPEN-DISPLAY with open-clx-display which
> seemed to do the trick but there's still a problem. CMUCL is
> complaining that it doesn't know about any of the symbols in the xlibs
> package so I have to go through all the source and xlib: all the
> functions. There must be a package command that'll save me but I can't
> figure it out. Can you help?

Well, you could either loop over all exported symbols in package XLIB
and import them or (less strenous, but likely to produce oddities from
time to time) start with an:
  (in-package "XLIB")

//Ingvar
-- 
(defun m (f)
  (let ((db (make-hash-table :test #'equal)))
    #'(lambda (&rest a)
        (or (gethash a db) (setf (gethash a db) (apply f a))))))
From: charlieb
Subject: Re: quick CLX packages question.
Date: 
Message-ID: <c1fpmu$1ialg7$1@ID-208832.news.uni-berlin.de>
Ingvar Mattsson wrote:

> charlieb <··@privacy.net> writes:
> 
> 
>>hi,
>>	I'm looking at the CLX manual and I've taken the source for
>>the first part (just-say-lisp) and am trying to get it to run with
>>cmucl. So far I have replaced OPEN-DISPLAY with open-clx-display which
>>seemed to do the trick but there's still a problem. CMUCL is
>>complaining that it doesn't know about any of the symbols in the xlibs
>>package so I have to go through all the source and xlib: all the
>>functions. There must be a package command that'll save me but I can't
>>figure it out. Can you help?
> 
> 
> Well, you could either loop over all exported symbols in package XLIB
> and import them or (less strenous, but likely to produce oddities from
> time to time) start with an:
>   (in-package "XLIB")
> 
> //Ingvar
Thanks
I ended up putting xlib: before everything in the end.
BTW what're the style guidelines for using packages? I don't have a 
great grasp on package concepts so if the answer is "go away and read 
some docs" so be it.

Cheers,
Charlieb.