Subject: Re: bug#47552: 27.1; cl-defstruct field names matching read-only variables -> bad code

From: Stefan Monnier <[email-masked]>
Date: Fri, 23 Jun 2023 11:37:53 -0400

>     (defmacro slet* (bindings &rest body)
>       (named-let expand ((bindings bindings))
>         (pcase-exhaustive bindings
>           ('() (macroexp-progn body))
>           (`((,var ,exp) . ,bindings)
>            (let ((rest (expand bindings)))
>      	     (if (macroexp--dynamic-variable-p var)
>      	         `(funcall (identity (lambda (,var) ,rest)) ,exp)
>      	       (macroexp-let* `((,var ,exp)) rest)))))))

Not sure we want to expose that to the language, so I turned it into
a function in `cl-macs.el` for use by `cl-defun/defmacro/defsubst/...`
and pushed it to `master`.

I believe this fixes the bug.

        Stefan