[Openmcl-devel] a function to create a symbol in a given package

Gary King gwking at metabang.com
Wed Jun 3 14:40:31 PDT 2009


Hiya. Isn't #'intern the fuunction you want?  You could also consider  
(serf symbol-value (intern <name> <package>)) <some-value>).

--
Earth First
(we'll take care of the other planets later)

On Jun 3, 2009, at 4:56 PM, Robert Goldman <rpgoldman at sift.info> wrote:

> Taoufik Dachraoui wrote:
>> Hi
>>
>> I tried but could not find a way to create a function that creates a
>> symbol in a given package.
>>
>> I woud appreciate if someone can helpp me write the following  
>> function:
>>
>> (defun crate-symbol-in-package (symbol value package)
>>   .....)
>>
>> example of use:
>>
>> ? *package*
>> COMMON-LISP-USER
>> ? (create-symbol-in-package 'client  'me 'world)
>> WORLD:CLIENT
>> ? world::client
>> 'ME
>>
>>
>
> How about
>
> (intern "CLIENT" :world)
> (setf world::client 'me)
>
> or, for that matter
>
> (defvar world::client 'me)
>
> what is it that you are trying to achieve here?  This
> create-symbol-in-package is so deeply unidiomatic, that I suspect if  
> we
> looked at what you are trying to do in context, we will find that it  
> can
> be achieved more easily in other ways.
>
> For what purpose do you believe you need this function?
> _______________________________________________
> Openmcl-devel mailing list
> Openmcl-devel at clozure.com
> http://clozure.com/mailman/listinfo/openmcl-devel



More information about the Openmcl-devel mailing list