[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#26960: 26.0.50; Complaints about unused variable in cl-destructuring
From: |
Lars Ingebrigtsen |
Subject: |
bug#26960: 26.0.50; Complaints about unused variable in cl-destructuring-bind |
Date: |
Mon, 09 May 2022 11:25:38 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) |
Stefan Monnier <monnier@iro.umontreal.ca> writes:
> Indeed. If you look at the macroexpanded code, you see that
> `cl-destructuring-bind` uses:
>
> (let* ((_ '(1 2))
> (a _)
> (b (if _ (pop _)
> (signal 'wrong-number-of-arguments
> (list '(&whole a b &rest _) (length _))))))
> (print (list a b)))
>
> so, you can see that the problem is that `cl-destructuring-bind` tries
> to avoid using gensym and "abuses" the &rest var as the "iterator"
> variable while parsing the list.
Hm, right.
I had a quick peek at `cl--do-arglist' (which I guess is what's creating
this form), and... I think I'll leave this for somebody else to fix. ðŸ«
In any case, I'm unmerging these two bug reports, and closing the one
that's fixed.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no