Re: symbold and packages

Ronald Sudomo <[email protected]> Thu, 8 Jul 2004 18:17:50 -0600
Newsgroups gmane.lisp.allegro
Message-ID <[email protected]>
Ok. I think now I have a better understanding on what you are trying to 
do. Here is one suggestion:

(let ((*package* (find-package 'p2)))
   (p2::test (read input))
  )

This would make all the symbols read to be in package p2.

--ronald



On Jul 8, 2004, at 4:28 PM, Fabrizio Morbini wrote:

> On Thu, 8 Jul 2004, David Mittman wrote:
>
>> Defining the p1::goo function like this might help:
>>
>> (in-package p1)
>>
>> (defun goo ()
>>    (p2::test 'p2::p))
>>
>> Other than that, I'd have to know more about what you see as the
>> problem and what you intend these functions to do.
>
> Thanks, I cannot do this because I don't actually pass the symbol p
> directly (with 'p) but is read from a file that contains a list of 
> these
> symbols and each one of these is passed as parameter to the function.
>
> Basically the package p2 corresponds to a "utilties" package in which I
> have a function that adds "a" or "an" before a word as it is the
> necessary. The global variable *test* contains a list of words that are
> exceptions to the a-or-an rule. So if the current word is a member of
> these exceptions than it adds "an" otherwise "a".
>
> Thanks again, Fabrizio.