GNU bug report logs - #8711
24.0.50; binding _ to unused values with lexical-binding

Previous Next

Package: emacs;

Reported by: Helmut Eller <eller.helmut <at> gmail.com>

Date: Sat, 21 May 2011 18:45:02 UTC

Severity: minor

Found in versions 24.0.50, 26.0.50

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


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

From: Helmut Eller <eller.helmut <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: Re: bug#8711: 24.0.50; binding _ to unused values with lexical-binding
Date: Tue, 24 May 2011 08:01:44 +0200
* Stefan Monnier [2011-05-24 00:56] writes:

>>> It can insert (ignore nil) instead which should have the same effect but
>>> without triggering the other warning with lexical-binding.
>
>> Indeed.  But I quickly run into another case where that doesn't help:
>
>> (defun foo (x) (destructuring-bind (y &rest _) x y))
>
> I don't see any warning for this code.  What warning do you get?

;; -*- lexical-binding: t -*-
(defun foo (x) (destructuring-bind (y &rest _) x y))

x.el:2:1:Warning: variable `_' not left unused


Helmut





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

Previous Next


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