Hello,
Can anyone tell a way to dump the contents of a package.
(I want an output of all functions in a certain package)
Thanks, Christiaan ten Klooster
In article <·················@cadservices.nl>,
ckl <··········@cadservices.nl> wrote:
>Can anyone tell a way to dump the contents of a package.
>(I want an output of all functions in a certain package)
use DO-SYMBOLS:
(do-symbols (s '<package-name>)
(when (symbol-function s)
(print s)))
--
Barry Margolin, ······@bbnplanet.com
GTE Internetworking, Powered by BBN, Burlington, MA
*** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups.
In article <···················@burlma1-snr1.gtei.net>,
Barry Margolin <······@bbnplanet.com> wrote:
>In article <·················@cadservices.nl>,
>ckl <··········@cadservices.nl> wrote:
>>Can anyone tell a way to dump the contents of a package.
>>(I want an output of all functions in a certain package)
>
>use DO-SYMBOLS:
>
>(do-symbols (s '<package-name>)
> (when (symbol-function s)
^^^^^^^^^^^^^^^^^^^
(fboundp s ) may work a bit better. and
(and (fboundp s ) (not (or (macro-function s )
(special-operator-p s ))))
if you are specifically interested in only functions (not macros and special
stuff ). SPECIAL-OPERATOR-P may be masquerading as SPECIAL-FORM-P.
And if you're not interested in imported stuff..
(and (eq .. package looking in ...
(symbol-package s ))
(fboundp s )
(or ... ) )
P.S. You may also wish to take a gander at WITH-PACKAGE-ITERATOR
http://www.harlequin.com/education/books/HyperSpec/Body/mac_with-package-iterator.html#with-package-iterator
--
Lyman S. Taylor Scully: "I have a date."
(·····@cc.gatech.edu) Mulder: "Can you cancel?"
Scully: "Unlike you, Mulder, I would
like to have a life."
Mulder: "I have a life!"