GNU bug report logs - #26960
26.0.50; Complaints about unused variable in cl-destructuring-bind

Previous Next

Package: emacs;

Reported by: Philipp Stephani <p.stephani2 <at> gmail.com>

Date: Wed, 17 May 2017 09:24:01 UTC

Severity: minor

Found in versions 24.0.50, 26.0.50

Full log


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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 26960 <at> debbugs.gnu.org, 8711 <at> debbugs.gnu.org,
 Helmut Eller <eller.helmut <at> gmail.com>
Subject: Re: bug#26960: 26.0.50; Complaints about unused variable in
 cl-destructuring-bind
Date: Mon, 09 May 2022 11:25:38 +0200
Stefan Monnier <monnier <at> 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




This bug report was last modified 3 years and 38 days ago.

Previous Next


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