Subject: bug#66342: Quote cl-generic-current-method-specializers

From: Stefan Kangas <[email-masked]>
Date: Sat, 1 Mar 2025 19:41:08 -0800

Stefan Monnier <[email-masked]> writes:

> Hi,
>
>> Currently, cl-generic-current-method-specializers expands into an alist
>> of the form ((ARG . TYPE)...).  The patch I provide quotes this so that
>> it can serve as a proper sexp.
>
> Interesting.  Out of curiosity, where/how did you bump into this?
>
>> Without quoting, this expansion is a bad sexp that, when evaluated,
>> results in an error.
>
> Indeed, it was never meant to be inserted as-is in the macro-expanded
> code, instead the idea was that a macro could use
>
>     (macroexpand '(cl-generic-current-method-specializers)
>                  macroexpand-all-environment)
>
> to collect type information about the variables to decide how to
> generate its code.  This was not very well thought out (e.g. this typing
> information may be invalid if the method mutates those vars) and AFAIK
> it's never been used anywhere.
>
> Maybe it's best to get rid of it?

If it's not useful, and anyways not used by anyone, I think it's better
to get rid of it.

Thuna, would you like to propose a patch that does that?