Re: [cl-markdown-devel] (no subject)

Gary King <[email protected]> Fri, 20 Jul 2007 16:06:29 -0400
Newsgroups gmane.lisp.cclan.general
Message-ID <[email protected]>
Hi Luke,

Hmmm, asdf:find-system will find the _system_ file (possibly loading  
it) but it won't tell you if CL-Markdown is loaded or not. ASDF  
defines (and exports) operation-done-p but you have to use it with  
classes, not symbols. Once could do

> (in-package #:asdf)
>
> (defmethod operation-done-p ((o symbol) (c t))
>   (operation-done-p (make-instance o) c))
>
> (defmethod operation-done-p ((o t) (c symbol))
>   (operation-done-p o (find-system c)))

And then ask (operation-done-p 'asdf:load-op 'cl-markdown)

or you could define

> (defun system-loaded-p (system)
>   (operation-done-p 'load-op (find-system system)))

and ask (system-loaded-p 'cl-markdown)

It seems like this is a general sort of facility; maybe someone on  
the CCLAN list will have other ideas. If not, I'm going to suggest  
that the three definitions above (or at least the first two) become  
part of ASDF.

HTH,

On Jul 20, 2007, at 1:25 PM, Luke J Crook wrote:

> Should I use (find-system 'cl-markdown) to detect if CL-MARKDOWN is  
> loaded?
> - Luke
> _______________________________________________
> cl-markdown-devel mailing list
> [email protected]
> http://common-lisp.net/cgi-bin/mailman/listinfo/cl-markdown-devel

--
Gary Warren King, metabang.com
Cell: (413) 885 9127
Fax: (206) 338-4052
gwkkwg on Skype * garethsan on AIM





-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/