[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#43678: 27.1; compiler warning if code forgets to require cl-lib
From: |
Stefan Monnier |
Subject: |
bug#43678: 27.1; compiler warning if code forgets to require cl-lib |
Date: |
Mon, 28 Sep 2020 16:04:54 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
> In bbdb-tex:
> bbdb-tex.el:415:25:Error: Forgot to expand macro cl-progv in (cl-progv ...
Oh, yes, now I can reproduce it as well (I was using an older version
of BBDB before). And indeed, I had misunderstood the error, this one is
a different one from the one I was thinking of.
This error is because `cl-progv` was not known to the compiler when we
started compiling the `bbdb-tex` function, but during the course of its
compilation, something somewhere caused `cl-lib` to be loaded such that
by the time the byte-compiler gets to look again at (cl-progv ...), it
now notices that it's a macro, which should not be possible because we
should have performed all the macro-expansion at the very
beginning already.
Hmmm... indeed it's clearly not a very helpful message since it even
misled its original author. I think when I wrote it I assumed it would
only occur because of an internal bug, but clearly it can occur in
other cases.
I'm not sure what would be a good error message.
Maybe something like "`cl-progv` defined too late"?
Stefan