Re: ASDF: optimization settings and other enhancements



Klaus Weidner <kweidner@xxxxxxxxx> writes:

> On 2005-08-30, John <MGYF9fXO@xxxxxxxxxxxxxx> wrote:
> > On 2005-08-30, Klaus Weidner <kweidner@xxxxxxxxx> wrote:
> >> This way, (asdf::use :cl-ppcre :xmls) works interactively to load multiple
> >> packages.
> >
> > I guess that's a little shorter than:
> >
> > (require 'cl-ppcre)
> > (require 'xmls)
> >
> > but not by much.
>
> That would be nice if it worked consistently, but on my Debian system it only
> appears to be supported for SBCL. It doesn't work for CLISP, CMUCL, and GCL.
> How do other CL dialects handle "require"? (It's deprecated and marked as
> implementation dependent in the Hyperspec, so that doesn't help here...)
>
> My point is that (as far as I know) making "require" work consistently would
> need modifications to each Lisp environment individually (and may not be easily
> possible since the language doesn't allow redefining functions in the CL
> package), while (asdf:use) could be made to work within ASDF itself, so it
> would be easier to make consistent, especially since it's such a simple change.

Although it's not portable, you could do something like this in your init files:

(let ((cl-require #'require))
(setf (symbol-function 'require)
(lambda (name &optional pathnames)
(let ((sys (and (null pathnames)
(asdf:find-system name nil))))
(if sys
(asdf:oos 'asdf:load-op sys)
(funcall cl-require name pathnames))))))

Then bug the offending implementors to support asdf via require so you
can rid yourself of that awefulness :-)

(Alternately, you can just use SLIME's ,load-system command)

--
/|_ .-----------------------.
,' .\ / | Free Mumia Abu-Jamal! |
,--' _,' | Abolish the racist |
/ / | death penalty! |
( -. | `-----------------------'
| ) |
(`-. '--.)
`. )----'
.