[Top][All Lists]

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

policy, recommendations regarding `cl-*'

From: Drew Adams
Subject: policy, recommendations regarding `cl-*'
Date: Tue, 25 Sep 2012 13:31:17 -0700

I have code that uses macros from cl*.el.  This code needs to work with multiple
Emacs versions.  It is not clear to me how, if at all, I should change it now.

NEWS provides no guidance, AFAICT.  It says only this:

 *** CL's main entry is now (require 'cl-lib).
 `cl-lib' is like the old `cl' except that it uses the namespace cleanly,
 i.e. all its definitions have the "cl-" prefix (and internal definitions use
 the "cl--" prefix).

 If `cl' provided a feature under the name `foo', then `cl-lib' provides it
 under the name `cl-foo' instead, with the exceptions of the few definitions
 that had to use `foo*' to avoid conflicts with pre-existing Elisp entities,
 which have not been renamed to `cl-foo*' but just `cl-foo'.

 The old `cl' is now deprecated and is just a bunch of aliases that
 provide the old non-prefixed names.

That's all well and good for Emacs Dev coders, but it does not really guide
users wrt code that must work with multiple Emacs versions.  And the CL manual
does not seem to reflect this change at all.  At least I find no guidance there
either about this.

I would expect to see a clear explanation, with recommendations, of migration
and multiple-version support - in NEWS, preferably.  That is normal for What's
New, README, or Release Changes documents for software.

For example, if I currently have (loop...), what do you recommend?  Replace it
by this?

 (if (fboundp 'cl-loop) (cl-loop...) (loop...))

And likewise for all the rest.

(Yes, I know that this is only a deprecation now, and not yet desupport.  I
would nevertheless like to know what you recommend for supporting multiple Emacs

reply via email to

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