GNU bug report logs - #66342
Quote cl-generic-current-method-specializers

Previous Next

Package: emacs;

Reported by: Thuna <thuna.cing <at> gmail.com>

Date: Wed, 4 Oct 2023 14:20:02 UTC

Severity: normal

Tags: moreinfo, patch

Full log


Message #13 received at 66342 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Thuna <thuna.cing <at> gmail.com>
Cc: 66342 <at> debbugs.gnu.org
Subject: Re: bug#66342: Quote cl-generic-current-method-specializers
Date: Fri, 14 Feb 2025 17:16:40 -0500
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?


        Stefan





This bug report was last modified 161 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.