Eric Schulte <eric.schu...@gmx.com> writes:
> Is there a convention for which macros from cl-macs are allowable and
> which are forbidden?

You might want to ask on the Emacs list, but my understanding is that no
Emacs core packages should depend on cl _at runtime_, but it is OK to
use the cl package during byte-compilation.

>  For example `flet' is used extensively throughout
> the Org-mode code base.  Is the convention that macros are allowable
> while functions are not?

A macro would typically be expanded at compile time, so that would be
OK.  AFAIK gensym is a function, not a macro.  The calls to gensym that
the byte-compiler complains about are expanded at runtime because they
are themselves inside a macro definition.

> Also, while intersection below is a function defined in cl-seq, the use
> of `intersection' in ob.el refers to a local function and not the cl-seq
> function, so it should be fine.

The byte-compiler thinks otherwise, so I'd check that assumption
again... but it might be a good idea to disambiguate the name with a
prefix anyway.  I've just tested the latter approach (renaming
intersection to ob-intersection) and it does work, so somehow the
byte-compiler doesn't quite get what is going on in the flet expansion
when the symbol is already present via the cl package.

I've just looked at the comments in cl-macs.el and it seems that flet
should be used with care anyway, since it is not quite doing what it is
supposed to do...


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Samples for the Waldorf Blofeld:
http://Synth.Stromeko.net/Downloads.html#BlofeldSamplesExtra


Reply via email to