emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: is requiring cl bad?


From: Ivan Kanis
Subject: Re: is requiring cl bad?
Date: Mon, 17 Dec 2012 21:58:18 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

Stefan Monnier <address@hidden> wrote:

>> I was under the impression that requiring cl was bad (TM).  I can't
>> remember why.  Is it still so?
>
> The CL package is unclean w.r.t to its use of the namespace.  Using its
> macros is tolerated because it only imposes this namespace mess during
> byte-compilation of your package, but using its functions imposes the
> mess during actual use of your package.
>
> 24.3 finally provides an alternative: `cl-lib' which offers the
> same functionality but in a namespace-clean way (i.e. using a "cl-"
> prefix everywhere).

In case someone is reading this thread, here's what I did in the end:

(require 'cl-lib)

(eval-when-compile
  (require 'cl)) 

Rename all common lisp functions, for example coerce -> cl-coerce. I had
to keep 'cl for macro expansion such as incf.

I removed the following at the end of the fileĀ :

;; Local Variables:
;; byte-compile-warnings: (not cl-functions)
;; End:

Now it compiles without warning.
-- 
Ivan Kanis
http://ivan.kanis.fr

The essence of science: ask an impertinent question, and you are on
the way to a pertinent answer.
    -- Jacob Bronowski

I am listening to "Coldplay - In My Place".



reply via email to

[Prev in Thread] Current Thread [Next in Thread]