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

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

RE: [External] : Re: `cl-macs' [was: about keysee]


From: Drew Adams
Subject: RE: [External] : Re: `cl-macs' [was: about keysee]
Date: Sun, 11 Dec 2022 21:35:34 +0000

> Requiring `cl-macs` won't help you there, because the 
> first thing `cl-macs` does is (require 'cl-lib).

Ah, darn, so it does; too bad.  But thanks.

> Instead you want (eval-when-compile (require 'cl-lib))

Normally I do use eval-when-compile, in particular for
a macros file.  I don't recall why I didn't do it here,
for `cl-macs'.

Anyway it turns out that's insufficient, because  I also
use `cl-remove-if', which is in `cl-seq'.  Just picking
up `cl-lib' at compile time leaves that undefined.
(No doubt loading `cl-macs' at runtime took care of
`cl-remove-if' because it was loading `cl-lib', though I
likely wasn't aware of that.)

And `cl-seq' also requires `cl-lib'.  So I might as well
just require `cl-lib' at runtime.  That has the same
effect as what I've been doing all along (requiring
`cl-macs').  Anyway, I've made that change now.

Too bad - looks like there's no easy way to load just
the parts of `cl*' that are actually needed - separation
into different files provides no such benefit apparently. 

> > [Plus, things have changed in `cl*' world over the
> > years.  What's there, and where, for older Emacs
> > can differ from what's there, and where, for more
> > recent releases.  Libraries that are usable with
> > multiple releases don't necessarily follow a "do
> > this" injunction that makes sense only for some
> > later releases.]
> 
> That's exactly why you should require `cl-lib` rather than `cl-macs`:
> because things can move between the different files of `cl-lib`.

It's not just about changes within the `cl-lib' circus.
Some of my libraries are compatible back to earlier
releases that predate `cl-lib' (added in Emacs 23).
And `cl-macs' does still contain the macros.



reply via email to

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