[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Some libraries does (require 'cl)
From: |
Stefan Monnier |
Subject: |
Re: Some libraries does (require 'cl) |
Date: |
Sat, 19 May 2007 10:31:52 -0400 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.1.50 (gnu/linux) |
> However there is one thing I do not understand and that other people have
> asked: If one want to use functions from cl.el (not only macros), how does
> one do then? Is (eval-when-compile (require 'cl)) sufficient then?
Solution 1: you don't!
Solution 2: you make sure that your call to the CL function can be replaced
by non-CL functions, using CL's compiler-macros.
(a compiler-macro is basically a compiler directive that tells how to
optimize/compile particular calls to a function. E.g. you can add
a compiler-macro to the function * such that (* 1 x) is replaced by just x.
IIRC the CL `list*' function has a compiler-macro that replaces most
calls to it by a combination of `cons' calls).
Stefan