help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Screenshots, frame shots straight from Emacs


From: Stefan Monnier
Subject: Re: Screenshots, frame shots straight from Emacs
Date: Tue, 20 Jul 2021 17:48:45 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

>> -(require 'cl)
>> +(require 'cl-lib)
> What is the difference?

They provide the same features but under different names (i.e. the
above change should generally come with other changes to adjust to the
different names; they seemed to be missing from the patch).

E.g. `cl` provides `position` and `mapcar*` whereas `cl-lib` provides
`cl-position` and `cl-mapcar`.  All the functions/macros/variables
exported by `cl-lib` use the `cl-` prefix.

[ Note that in Emacsā‰„24.3, `(require 'cl)` will require `cl-lib` under
  the hood (and then re-export its functions under the old name), and
  the reverse holds for Emacs<24.3 if you use the forward compatibility
  `cl-lib` package from GNU ELPA.  So loading `cl` may also sometimes
  end up defining the `cl-<foo>` functions, and loading `cl-lib` may
  also sometimes define the "not cl-<foo>" functions.  ]

> Why is that needed?

Because `cl` is deprecated.

> Is it it backward compatible?

Featurewise, almost.  But it does require code changes (mostly adding
`cl-` prefixes).

> There have been changes to working with cl package for some time, has
> the dust settled yet?

AFAIK the dust settled back when Emacs-24.3 was released with `cl-lib`.
`cl-lib` was slated to (slowly) replace `cl`.  In the upcoming Emacs-28,
`cl` is officially deprecated (tho still fully supported).  In some
future release the plan is to remove `cl` from Emacs itself, tho we
may then create a GNU ELPA package for it.

IOW, there's no hurry, but moving packages away from `cl` is
recommended (as is the conversion to use `lexical-binding`: all files
bundled with Emacs-28 use `lexical-binding`).


        Stefan




reply via email to

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