> > I thought that the point of creating `cl-lib.el=
' was to give people a
> > library of the most-used CL constructs and still let them avoid l=
oading
> > all of `cl.el'.=C2=A0 If we are, in effect, loading `cl-extra=
.el' now nearly
> > by default then what's the point of separating out `cl-lib.el=
'?
>
> AFAIK, the point of cl-lib is to have the CL constructs in a separate<=
br class=3D"gmail_msg">
> namespace, so that loading cl-lib doesn't change the semantics of<=
br class=3D"gmail_msg">
> existing code that might not expect it (unlike cl.el).
What part of `cl.el' changes the semantics of existing [non-cl.el]
code?
Loading cl.el modifies the observable=
behavior of dolist.=C2=A0 For example, insert the following into /tmp/doli=
st.el:
;;; -*- lexical-binding: t; -*-
(=
eval-when-compile (require 'cl-lib))
(message "Witho=
ut cl.el")
(cl-dolist (i '(1 2 3))
=C2=
=A0 (dolist (j '(a b c))
=C2=A0 =C2=A0 (message "i =3D %=
s, j =3D %s" i j)
=C2=A0 =C2=A0 (when (=3D i 2) (cl-return))=
))
(message "\nWith cl.el")
(eval-when-co=
mpile (require 'cl))
(cl-dolist (i '(1 2 3))
=C2=A0 (dolist (j '(a b c))
=C2=A0 =C2=A0 (message &quo=
t;i =3D %s, j =3D %s" i j)
=C2=A0 =C2=A0 (when (=3D i 2) (cl=
-return))))
And then run:
$ emacs -Q -batch -l /tmp/dolist.el=C2=A0
Without cl.el
i =3D 1, j =3D a
i =3D 1, j =3D b
i =3D 1, j =3D=
c
i =3D 2, j =3D a
With cl.el
i =3D 1, j =3D a
i =3D 1, j =3D b
i =3D 1, j =3D c
i =3D 2, j =3D a
i =3D 3, j =3D a
i =3D 3, j =3D=
b
i =3D 3, j =3D c
--001a113ac6b61bcb1d0547f849e8--