emacs-devel
[Top][All Lists]
Advanced

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

Re: CL package serious deficiencies


From: Eric Schulte
Subject: Re: CL package serious deficiencies
Date: Wed, 08 Feb 2012 08:39:23 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.93 (gnu/linux)

Lennart Borgman <address@hidden> writes:

> On Wed, Feb 8, 2012 at 14:51, Eric Schulte <address@hidden> wrote:
>>>>
>>>> org-count
>>>> org-find-if
>>>> org-reduce
>>>> org-remove-if
>>>> org-remove-if-not
>>>
>>> I must be misremembering. Isn't it ok to use the cl functions here?
>>> (You would be using it in compiled code.)
>>>
>>
>> You are misremembering.  If it were ok org, gnus, ert and widget would
>> not all have their own remove-if variants?
>
> Thanks. Or, I might be misunderstanding ;-)
> The manual says in D.1 Emacs Lisp Coding Conventions that
>
>     However, there is no problem with using the `cl' package at
>      compile time, with `(eval-when-compile (require 'cl))'.  That's
>      sufficient for using the macros in the `cl' package, because the
>      compiler expands them before generating the byte-code.
>
> Is that not enough, or is it not applicable to code included in Emacs?
>

The above only applies to *macros* which are expanded at compile time.
The expanded macros leave no reference to cl in the resulting compiled
code.  On the contrary cl functions (even in compiled code) when called
at runtime still require cl to be loaded and available at runtime.

Hope this makes it clear,

-- 
Eric Schulte
http://cs.unm.edu/~eschulte/



reply via email to

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