In order to include Common Lisp compatibility I've seen both
Which is correct? As I understand the
cl-lib is the later of the two, but is it safe to use just it?
Emacs Stack Exchange is a question and answer site for those using, extending or developing Emacs. It only takes a minute to sign up.Sign up to join this community
The first is the old library, the second is the new one.
The old one defines things like
incf, whereas the second defines instead
The old one is deprecated because it does not obey the general rule that packages should use a "package prefix" for all their definitions to try and avoid conflicts with other packages. IOW the old one messes up the namespace whereas the new one is careful to only use identifiers which start with
Old versions of Emacs only come with
cl but you can install the
cl-lib forward-compatibility package from GNU ELPA which internally uses the old
cl and just re-exports the same definitions under their new name.
New versions of Emacs come with a real
cl-lib which does not use
cl internally and instead they have a
cl backward-compatibility package which internally uses
cl-lib and just re-exports the same definitions under their old name.