Re: Common Lisp: Forward reference to a symbol in an unloaded package, possible?
- From: Matthias Benkard <mulkiatsch@xxxxxxxxx>
- Date: Mon, 28 Apr 2008 11:25:50 -0700 (PDT)
On Apr 28, 7:05 pm, p...@xxxxxxxxxxxxxxxxx (Pascal J. Bourguignon)
wrote:
(defun _load (name)
(let ((asdf (find-package "ASDF")))
(if asdf
(let ((operate (find-symbol "OPERATE" asdf))
(load-op (find-symbol "LOAD-OP" asdf)))
(assert (and operate load-op))
(funcall (symbol-function operate) load-op name))
(error "ASDF has not been loaded."))))
If you find that hard to read, you can do something like the
following:
(defun _load (name)
(declare (special name))
(eval (read-from-string "(asdf:operate 'asdf:load-op name)")))
Anyway, you most probably shouldn't do this. It's evil. Please try
the DEFPACKAGE way before resorting to something nasty that you might
regret later.
Matthias
.
- References:
- Prev by Date: Re: Greenspunning ML (revisited)
- Next by Date: Re: Common Lisp: Forward reference to a symbol in an unloaded package, possible?
- Previous by thread: Re: Common Lisp: Forward reference to a symbol in an unloaded package, possible?
- Next by thread: Re: Common Lisp: Forward reference to a symbol in an unloaded package, possible?
- Index(es):