From luke at balooga.com Fri Jul 20 17:25:36 2007 From: luke at balooga.com (Luke J Crook) Date: Fri, 20 Jul 2007 13:25:36 -0400 Subject: [cl-markdown-devel] (no subject) Message-ID: <20070720172537.81491.qmail@mail.superb.net> Should I use (find-system 'cl-markdown) to detect if CL-MARKDOWN is loaded? - Luke From gwking at metabang.com Fri Jul 20 20:06:29 2007 From: gwking at metabang.com (Gary King) Date: Fri, 20 Jul 2007 16:06:29 -0400 Subject: [cl-markdown-devel] (no subject) In-Reply-To: <20070720172537.81491.qmail@mail.superb.net> References: <20070720172537.81491.qmail@mail.superb.net> Message-ID: <69CDAC04-6209-49D9-964A-1086F76EC59F@metabang.com> 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 > cl-markdown-devel at common-lisp.net > 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