Subject: bug#65017: 29.1; Byte compiler interaction with cl-lib function objects, removes symbol-function

From: Stefan Monnier <[email-masked]>
Date: Mon, 07 Aug 2023 22:44:29 -0400

> I suggest installing this patch into master.

LGTM, thanks.

>> > Stefan, it would still be nice for cl--labels-convert-cache to get
>> > initialised each time it gets used.
>> No, the problem is not initialization, as I pointed out.  The problem is
>> that this `eq` should not consider a symbol equal to a sympos *ever*
>> (contrary to most other uses of `eq` in macros).
>
> Are you sure?

Yes.

> Why not?

Not sure how to explain it any further than what I already described.

> If cl--labels-convert-cache is being used
> inside the byte compiler, it surely needs to consider #<symbol foo at
> 42> and #<symbol foo at 60> as eq?

No, it should not treat them equal (when it does, it introduces an
incorrect sympos and can thus lead to error messages pointing at the
wrong place).

> There is no mechanism to make these two SWPs eq whilst excluding their
> eq with the bare symbol.

We luckily don't need such a mechanism here: we just need to use
"BASE_EQ" :-)

        Stefan