emacs-devel
[Top][All Lists]
Advanced

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

Re: policy, recommendations regarding `cl-*'


From: Stefan Monnier
Subject: Re: policy, recommendations regarding `cl-*'
Date: Wed, 26 Sep 2012 13:54:54 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux)

>>> On a related note, am I understanding right that functions
>>> and macros from cl-macs.el will *not* trigger warnings?
>> Depends what kind of warning and in which circumstance.
> I have a test.el file with just this:
>   (eval-when-compile (require 'cl))
>   (cl-position '1 '(0 1 2 3))
>   (cl-defsubst test () (message "blah"))

There's a bug: at run time, CL will not be loaded, so cl-position
won't exist.
For cl-defsubst, that's not a problem, because it gets macroexpanded
away during compilation, so it's not needed at run-time.

IOW if you use CL functions, you need (require 'cl-lib) without wrapping
it in eval-when-compile.


        Stefan



reply via email to

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