From unknown Thu Jun 19 14:05:31 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#8711 <8711@debbugs.gnu.org> To: bug#8711 <8711@debbugs.gnu.org> Subject: Status: 24.0.50; binding _ to unused values with lexical-binding Reply-To: bug#8711 <8711@debbugs.gnu.org> Date: Thu, 19 Jun 2025 21:05:31 +0000 retitle 8711 24.0.50; binding _ to unused values with lexical-binding reassign 8711 emacs submitter 8711 Helmut Eller severity 8711 minor thanks From debbugs-submit-bounces@debbugs.gnu.org Sat May 21 14:44:38 2011 Received: (at submit) by debbugs.gnu.org; 21 May 2011 18:44:38 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QNrAD-0007GC-Ud for submit@debbugs.gnu.org; Sat, 21 May 2011 14:44:38 -0400 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QNrAB-0007G0-GG for submit@debbugs.gnu.org; Sat, 21 May 2011 14:44:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QNrA5-0000c1-KX for submit@debbugs.gnu.org; Sat, 21 May 2011 14:44:30 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, RFC_ABUSE_POST, T_DKIM_INVALID, T_TO_NO_BRKTS_FREEMAIL autolearn=unavailable version=3.3.1 Received: from lists.gnu.org ([140.186.70.17]:48350) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QNrA5-0000bx-Iv for submit@debbugs.gnu.org; Sat, 21 May 2011 14:44:29 -0400 Received: from eggs.gnu.org ([140.186.70.92]:51264) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QNrA4-0001x2-Sk for bug-gnu-emacs@gnu.org; Sat, 21 May 2011 14:44:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QNrA3-0000bd-V7 for bug-gnu-emacs@gnu.org; Sat, 21 May 2011 14:44:28 -0400 Received: from mail-ww0-f49.google.com ([74.125.82.49]:44199) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QNrA3-0000bO-Po for bug-gnu-emacs@gnu.org; Sat, 21 May 2011 14:44:27 -0400 Received: by wwb39 with SMTP id 39so4150372wwb.30 for ; Sat, 21 May 2011 11:44:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:from:to:subject:date:message-id:user-agent :mime-version:content-type; bh=ObjyGyd88LNR0+WfdpdxZkF+BG4gAuHlCbAogeStNCs=; b=m1CnKhaPucaZ05JI89ctxNI2hqC/XrITE4v78hOLGEsZVEIK8qsLSitCtp31rVgqUZ zCHk1dWaVlIy1RIIMBbAS6tKxSepqWbz4Fm/FAqiKgIr4IAvo/BG1T/285y24LlwF1eY hNtmm0NVf8PSHhFxlFZH1PwO7dCE6qwrcd+cc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:subject:date:message-id:user-agent:mime-version :content-type; b=hkij+hiI3UlS4ixtvNzbS9jxcFyUPXEVLsGQEEK6c0AcdKIi6BbWq/MfvIyY1RG+cY 2pdF7s/MKP+swogeVJT3T2cWQ6vCJ3EwC+TI8ggE4NxDzYi3dm7hlKs1iOg09osn2Fl+ e1vWvCUNoQrGjju8qZPybzRMLp6piPiMptOg8= Received: by 10.216.191.208 with SMTP id g58mr715457wen.85.1306003466676; Sat, 21 May 2011 11:44:26 -0700 (PDT) Received: from ix ([212.46.168.133]) by mx.google.com with ESMTPS id s40sm2436810weq.4.2011.05.21.11.44.24 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 21 May 2011 11:44:25 -0700 (PDT) Received: from helmut by ix with local (Exim 4.72) (envelope-from ) id 1QNr9u-0007cV-Ej for bug-gnu-emacs@gnu.org; Sat, 21 May 2011 20:44:18 +0200 From: Helmut Eller To: bug-gnu-emacs@gnu.org Subject: 24.0.50; binding _ to unused values with lexical-binding Date: Sat, 21 May 2011 20:44:18 +0200 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.17 X-Spam-Score: -5.3 (-----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.3 (-----) There seems be no way to avoid a warning in code like this: ;; -*- lexical-binding: t -*- (eval-when-compile (require 'cl)) (defun foo (x) (destructuring-bind (_) x)) (defun bar (x) (destructuring-bind (_) x (ignore _))) In foo the compiler complains because _ is never used and it bar it complains because it is used. In GNU Emacs 24.0.50.1 (i686-pc-linux-gnu, GTK+ Version 2.20.1) of 2011-05-21 on ix Windowing system distributor `The X.Org Foundation', version 11.0.10707000 configured using `configure '--with-gif=no' '--with-gnutls=no'' From debbugs-submit-bounces@debbugs.gnu.org Mon May 23 05:01:41 2011 Received: (at submit) by debbugs.gnu.org; 23 May 2011 09:01:41 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QOR1B-0002jY-7V for submit@debbugs.gnu.org; Mon, 23 May 2011 05:01:41 -0400 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QOR12-0002jJ-2q for submit@debbugs.gnu.org; Mon, 23 May 2011 05:01:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QOR0w-0000sP-1Y for submit@debbugs.gnu.org; Mon, 23 May 2011 05:01:26 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_MED,T_RP_MATCHES_RCVD,T_TO_NO_BRKTS_FREEMAIL autolearn=unavailable version=3.3.1 Received: from lists.gnu.org ([140.186.70.17]:57835) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QOR0v-0000sL-Vy for submit@debbugs.gnu.org; Mon, 23 May 2011 05:01:25 -0400 Received: from eggs.gnu.org ([140.186.70.92]:59688) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QOR0v-0002Gx-4n for bug-gnu-emacs@gnu.org; Mon, 23 May 2011 05:01:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QOR0p-0000rS-Gf for bug-gnu-emacs@gnu.org; Mon, 23 May 2011 05:01:25 -0400 Received: from lo.gmane.org ([80.91.229.12]:44856) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QOR0p-0000qq-Ap for bug-gnu-emacs@gnu.org; Mon, 23 May 2011 05:01:19 -0400 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1QOR0m-00032N-6n for bug-gnu-emacs@gnu.org; Mon, 23 May 2011 11:01:16 +0200 Received: from e4300lm.epcc.ed.ac.uk ([129.215.63.156]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 23 May 2011 11:01:16 +0200 Received: from wence by e4300lm.epcc.ed.ac.uk with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 23 May 2011 11:01:16 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: bug-gnu-emacs@gnu.org From: Lawrence Mitchell Subject: Re: bug#8711: 24.0.50; binding _ to unused values with lexical-binding Date: Mon, 23 May 2011 10:01:04 +0100 Lines: 28 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: e4300lm.epcc.ed.ac.uk User-Agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.50 (gnu/linux) Cancel-Lock: sha1:sf/qKSmsg/OtFZ/UxbhlMWi2GXM= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.17 X-Spam-Score: -5.4 (-----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.4 (-----) Helmut Eller wrote: > There seems be no way to avoid a warning in code like this: > ;; -*- lexical-binding: t -*- > (eval-when-compile (require 'cl)) > (defun foo (x) (destructuring-bind (_) x)) > (defun bar (x) (destructuring-bind (_) x (ignore _))) > In foo the compiler complains because _ is never used and > it bar it complains because it is used. This latter is because cconv-analyse-use is not smart enough when checking for use of variables starting with an underscore. ;; -*- lexical-binding: t -*- (let ((_ nil)) (ignore _)) => Warning: variable `_' not left unused. This despite ignore not touching it. Lawrence -- Lawrence Mitchell From debbugs-submit-bounces@debbugs.gnu.org Mon May 23 10:24:41 2011 Received: (at 8711) by debbugs.gnu.org; 23 May 2011 14:24:42 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QOW3l-0002eh-A3 for submit@debbugs.gnu.org; Mon, 23 May 2011 10:24:41 -0400 Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QOW3j-0002eV-AT for 8711@debbugs.gnu.org; Mon, 23 May 2011 10:24:40 -0400 Received: from 213-159-126-200.fibertel.com.ar ([200.126.159.213]:40770 helo=ceviche.home) by fencepost.gnu.org with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1QOW3d-00055m-Qs; Mon, 23 May 2011 10:24:34 -0400 Received: by ceviche.home (Postfix, from userid 20848) id 2F3FB66131; Mon, 23 May 2011 11:24:31 -0300 (ART) From: Stefan Monnier To: 8711@debbugs.gnu.org Subject: Re: bug#8711: 24.0.50; binding _ to unused values with lexical-binding Message-ID: References: Date: Mon, 23 May 2011 11:24:31 -0300 In-Reply-To: (Lawrence Mitchell's message of "Mon, 23 May 2011 10:01:04 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -6.0 (------) X-Debbugs-Envelope-To: 8711 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.0 (------) >> There seems be no way to avoid a warning in code like this: >> ;; -*- lexical-binding: t -*- >> (eval-when-compile (require 'cl)) >> (defun foo (x) (destructuring-bind (_) x)) Hmm... the byte-compiler complains because the above gets turned into (let* ((--cl-rest-- x) (_ (if (= (length --cl-rest--) 1) (car --cl-rest--) (signal 'wrong-number-of-arguments (list nil (length --cl-rest--)))))) nil) which gets changes by byte-opt.el into (let* ((--cl-rest-- x)) (if (= (length --cl-rest--) 1) (car --cl-rest--) (signal 'wrong-number-of-arguments (list nil (length --cl-rest--)))) nil) And note that this is only done for a `nil' body (tho it can also be something like (progn nil) because that would be optimized to nil as well), and not for a body like `5' (although the optimization is just as valid for `5' as for nil). >> (defun bar (x) (destructuring-bind (_) x (ignore _))) (defun bar (x) (destructuring-bind (_) x (ignore nil))) works (because (ignore nil) happens not to be optimized to nil). > This latter is because cconv-analyse-use is not smart enough when > checking for use of variables starting with an underscore. > ;; -*- lexical-binding: t -*- > (let ((_ nil)) > (ignore _)) > => > Warning: variable `_' not left unused. > This despite ignore not touching it. The two warnings come from different analyzes: - The warning for `bar' comes from cconv.el which is intended to check whether the variable is syntactically used, rather than semantically. - The warning for `foo' checks whether pure functions are not called for their side-effects and it's applied after optimizations so in the above code, the code generated by destructuring-bind ends up optimized to something that calls `car' without binding the result to _ because it figured that _ is not used and just got rid of it without warning. So most likely the answers I give here aren't satisfactory to the OP, since his real problem is probably different than (destructuring-bind (_) x) and the solution for that problem is probably going to be yet different. Stefan From debbugs-submit-bounces@debbugs.gnu.org Mon May 23 14:24:21 2011 Received: (at submit) by debbugs.gnu.org; 23 May 2011 18:24:22 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QOZnh-00006A-Ap for submit@debbugs.gnu.org; Mon, 23 May 2011 14:24:21 -0400 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QOZnb-00005u-W5 for submit@debbugs.gnu.org; Mon, 23 May 2011 14:24:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QOZnV-0002Zx-PS for submit@debbugs.gnu.org; Mon, 23 May 2011 14:24:10 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-3.0 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RCVD_NUMERIC_HELO, T_RP_MATCHES_RCVD, T_TO_NO_BRKTS_FREEMAIL autolearn=unavailable version=3.3.1 Received: from lists.gnu.org ([140.186.70.17]:58333) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QOZnV-0002Zt-Mt for submit@debbugs.gnu.org; Mon, 23 May 2011 14:24:09 -0400 Received: from eggs.gnu.org ([140.186.70.92]:32870) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QOZnU-0005nq-EL for bug-gnu-emacs@gnu.org; Mon, 23 May 2011 14:24:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QOZnT-0002YB-Ai for bug-gnu-emacs@gnu.org; Mon, 23 May 2011 14:24:08 -0400 Received: from lo.gmane.org ([80.91.229.12]:44717) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QOZnT-0002Xp-0v for bug-gnu-emacs@gnu.org; Mon, 23 May 2011 14:24:07 -0400 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1QOZnR-0002dc-Qc for bug-gnu-emacs@gnu.org; Mon, 23 May 2011 20:24:05 +0200 Received: from 212.46.168.133 ([212.46.168.133]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 23 May 2011 20:24:05 +0200 Received: from eller.helmut by 212.46.168.133 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 23 May 2011 20:24:05 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: bug-gnu-emacs@gnu.org From: Helmut Eller Subject: Re: bug#8711: 24.0.50; binding _ to unused values with lexical-binding Date: Mon, 23 May 2011 20:23:52 +0200 Lines: 53 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: 212.46.168.133 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) Cancel-Lock: sha1:x7wYDlHDP5iMsULobL4WrgGa+5Y= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.17 X-Spam-Score: -4.3 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.3 (----) * Stefan Monnier [2011-05-23 14:24] writes: > The two warnings come from different analyzes: > - The warning for `bar' comes from cconv.el which is intended to check > whether the variable is syntactically used, rather than semantically. > - The warning for `foo' checks whether pure functions are not called for > their side-effects and it's applied after optimizations so in the > above code, the code generated by destructuring-bind ends up optimized > to something that calls `car' without binding the result to _ because > it figured that _ is not used and just got rid of it without warning. > > So most likely the answers I give here aren't satisfactory to the OP, > since his real problem is probably different than (destructuring-bind > (_) x) and the solution for that problem is probably going to be > yet different. My problem is basically that I have a macro "destructure-case" that expands to destructuring-bind, e.g.: (destructure-case location ((:error _) nil)) ; do nothing expands to (ecase (car location) (:error (destructuring-bind (_) (cdr location) (ignore _) nil))) The macro inserts the (ignore _) to suppress the "value returned from (car --cl-rest--) is unused" warning. But that trick only works for the non-lexical-binding case. I think that rewriting (let ((_ foo))) to (progn foo nil) is not quite right because that loses the information that the value that flows to the variable _ is intentionally ignored, but I guess that is somewhat hard to fix this. (Maybe byte-optimize-letX could call byte-optimize-form-code-walker directly but instead of specifying that the form is evaluated "for-effect" somehow say that the value is "ignorable".) It's perhaps easier to teach destructuring-bind the _ convention so that it can produce more direct code. There is also a somewhat related problem with loop: ;; -*- lexical-binding: t -*- (defun foo (alist) (loop for (_key . value) in alist collect value)) produces a "variable `_key' not left unused" warning. Helmut From debbugs-submit-bounces@debbugs.gnu.org Mon May 23 15:29:12 2011 Received: (at 8711) by debbugs.gnu.org; 23 May 2011 19:29:13 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QOaoR-0001bV-Ve for submit@debbugs.gnu.org; Mon, 23 May 2011 15:29:12 -0400 Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QOaoQ-0001bK-Bc for 8711@debbugs.gnu.org; Mon, 23 May 2011 15:29:11 -0400 Received: from 213-159-126-200.fibertel.com.ar ([200.126.159.213]:59283 helo=ceviche.home) by fencepost.gnu.org with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1QOaoK-0000Ht-K4; Mon, 23 May 2011 15:29:04 -0400 Received: by ceviche.home (Postfix, from userid 20848) id 253E266131; Mon, 23 May 2011 16:29:01 -0300 (ART) From: Stefan Monnier To: Helmut Eller Subject: Re: bug#8711: 24.0.50; binding _ to unused values with lexical-binding Message-ID: References: Date: Mon, 23 May 2011 16:29:01 -0300 In-Reply-To: (Helmut Eller's message of "Mon, 23 May 2011 20:23:52 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -6.0 (------) X-Debbugs-Envelope-To: 8711 Cc: 8711@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.0 (------) > My problem is basically that I have a macro "destructure-case" that > expands to destructuring-bind, e.g.: > (destructure-case location > ((:error _) nil)) ; do nothing > expands to > (ecase (car location) > (:error (destructuring-bind (_) (cdr location) > (ignore _) > nil))) > The macro inserts the (ignore _) to suppress the "value returned from > (car --cl-rest--) is unused" warning. It can insert (ignore nil) instead which should have the same effect but without triggering the other warning with lexical-binding. > I think that rewriting (let ((_ foo))) to (progn foo nil) is not quite > right because that loses the information that the value that flows to > the variable _ is intentionally ignored, but I guess that is somewhat > hard to fix this. (Maybe byte-optimize-letX could call > byte-optimize-form-code-walker directly but instead of specifying that > the form is evaluated "for-effect" somehow say that the value is > "ignorable".) I'm not completely satisfied with the "value returned from is unused" indeed, but it's not clear exactly how to fix it (short of always silencing it, which I'd rather not since it occasionally catches errors). > It's perhaps easier to teach destructuring-bind the _ convention so that > it can produce more direct code. Could be. destructuring-bind generates some other minorly-problematic code for the lexbind case. > There is also a somewhat related problem with loop: > ;; -*- lexical-binding: t -*- > (defun foo (alist) (loop for (_key . value) in alist collect value)) > produces a "variable `_key' not left unused" warning. I think the same problem happens with dotimes/dolist using the old definition: the loop vars `key' and `value' are let-bound outside the loop and then setq'd at each loop iteration (it's this setq that causes them to be "not left unused"). This was OK for the dynamic scoping case because let-binding is significantly more costly than setq, but it is not right for the lexical scoping case where the cost of let is not higher than `setq' and where the semantic is actually then wrong: e.g. if you "collect (lambda () value)" the current code ends up returning a list of functions that all return the last `value', rather than a list of functions that each return one of the `values' in the alist. Stefan From debbugs-submit-bounces@debbugs.gnu.org Mon May 23 16:16:55 2011 Received: (at submit) by debbugs.gnu.org; 23 May 2011 20:16:56 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QObYd-0002h3-1r for submit@debbugs.gnu.org; Mon, 23 May 2011 16:16:55 -0400 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QObYb-0002gr-1G for submit@debbugs.gnu.org; Mon, 23 May 2011 16:16:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QObYS-0006OZ-0A for submit@debbugs.gnu.org; Mon, 23 May 2011 16:16:47 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-3.0 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RCVD_NUMERIC_HELO, T_RP_MATCHES_RCVD, T_TO_NO_BRKTS_FREEMAIL autolearn=unavailable version=3.3.1 Received: from lists.gnu.org ([140.186.70.17]:34438) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QObYR-0006OV-V8 for submit@debbugs.gnu.org; Mon, 23 May 2011 16:16:43 -0400 Received: from eggs.gnu.org ([140.186.70.92]:50525) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QObYR-0003Yl-1e for bug-gnu-emacs@gnu.org; Mon, 23 May 2011 16:16:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QObYP-0006OB-Vl for bug-gnu-emacs@gnu.org; Mon, 23 May 2011 16:16:43 -0400 Received: from lo.gmane.org ([80.91.229.12]:54215) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QObYP-0006Nz-GO for bug-gnu-emacs@gnu.org; Mon, 23 May 2011 16:16:41 -0400 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1QObYK-00067q-Og for bug-gnu-emacs@gnu.org; Mon, 23 May 2011 22:16:36 +0200 Received: from 212.46.168.133 ([212.46.168.133]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 23 May 2011 22:16:36 +0200 Received: from eller.helmut by 212.46.168.133 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 23 May 2011 22:16:36 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: bug-gnu-emacs@gnu.org From: Helmut Eller Subject: Re: bug#8711: 24.0.50; binding _ to unused values with lexical-binding Date: Mon, 23 May 2011 22:16:22 +0200 Lines: 48 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: 212.46.168.133 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) Cancel-Lock: sha1:NwQ1CWdzIKItV8IcHh7zwLoZ6uI= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.17 X-Spam-Score: -4.3 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.3 (----) * Stefan Monnier [2011-05-23 19:29] writes: >> My problem is basically that I have a macro "destructure-case" that >> expands to destructuring-bind, e.g.: > >> (destructure-case location >> ((:error _) nil)) ; do nothing > >> expands to > >> (ecase (car location) >> (:error (destructuring-bind (_) (cdr location) >> (ignore _) >> nil))) > >> The macro inserts the (ignore _) to suppress the "value returned from >> (car --cl-rest--) is unused" warning. > > 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)) >> There is also a somewhat related problem with loop: > >> ;; -*- lexical-binding: t -*- >> (defun foo (alist) (loop for (_key . value) in alist collect value)) > >> produces a "variable `_key' not left unused" warning. > > I think the same problem happens with dotimes/dolist using the old > definition: the loop vars `key' and `value' are let-bound outside the > loop and then setq'd at each loop iteration (it's this setq that causes > them to be "not left unused"). This was OK for the dynamic scoping case > because let-binding is significantly more costly than setq, but it is > not right for the lexical scoping case where the cost of let is not > higher than `setq' and where the semantic is actually then wrong: > e.g. if you "collect (lambda () value)" the current code ends up > returning a list of functions that all return the last `value', rather > than a list of functions that each return one of the `values' in > the alist. The semantic of loop (in Common Lisp) allows both variants. So the "portable" idiom is "collect (let ((value value)) (lambda () value))". Helmut From debbugs-submit-bounces@debbugs.gnu.org Mon May 23 16:33:27 2011 Received: (at submit) by debbugs.gnu.org; 23 May 2011 20:33:27 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QOboc-000331-VO for submit@debbugs.gnu.org; Mon, 23 May 2011 16:33:27 -0400 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QOboa-00032n-J0 for submit@debbugs.gnu.org; Mon, 23 May 2011 16:33:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QOboU-0000c0-Ln for submit@debbugs.gnu.org; Mon, 23 May 2011 16:33:19 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-3.0 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RCVD_NUMERIC_HELO, T_RP_MATCHES_RCVD, T_TO_NO_BRKTS_FREEMAIL autolearn=unavailable version=3.3.1 Received: from lists.gnu.org ([140.186.70.17]:44054) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QOboU-0000bu-Jw for submit@debbugs.gnu.org; Mon, 23 May 2011 16:33:18 -0400 Received: from eggs.gnu.org ([140.186.70.92]:55615) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QOboT-0002s6-MG for bug-gnu-emacs@gnu.org; Mon, 23 May 2011 16:33:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QOboS-0000bi-OO for bug-gnu-emacs@gnu.org; Mon, 23 May 2011 16:33:17 -0400 Received: from lo.gmane.org ([80.91.229.12]:36886) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QOboS-0000bc-HW for bug-gnu-emacs@gnu.org; Mon, 23 May 2011 16:33:16 -0400 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1QOboQ-00086u-Vf for bug-gnu-emacs@gnu.org; Mon, 23 May 2011 22:33:14 +0200 Received: from 212.46.168.133 ([212.46.168.133]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 23 May 2011 22:33:14 +0200 Received: from eller.helmut by 212.46.168.133 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 23 May 2011 22:33:14 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: bug-gnu-emacs@gnu.org From: Helmut Eller Subject: Re: bug#8711: 24.0.50; binding _ to unused values with lexical-binding Date: Mon, 23 May 2011 22:32:56 +0200 Lines: 20 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: 212.46.168.133 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) Cancel-Lock: sha1:J3UnIommYjAn2nlBl165CJ1SeCE= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.17 X-Spam-Score: -4.3 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.3 (----) * Stefan Monnier [2011-05-23 19:29] writes: > I think the same problem happens with dotimes/dolist using the old > definition: the loop vars `key' and `value' are let-bound outside the > loop and then setq'd at each loop iteration (it's this setq that causes > them to be "not left unused"). This was OK for the dynamic scoping case > because let-binding is significantly more costly than setq, but it is > not right for the lexical scoping case where the cost of let is not > higher than `setq' and where the semantic is actually then wrong: > e.g. if you "collect (lambda () value)" the current code ends up > returning a list of functions that all return the last `value', rather > than a list of functions that each return one of the `values' in > the alist. BTW, is there a good reason why we can't disallow setq on closed over variables in Elisp? That kind of mutability seems like a bad idea in a concurrent world. Closures are a new feature so we could make a conscious decision not to introduce the problematic mutable variables. Helmut From debbugs-submit-bounces@debbugs.gnu.org Mon May 23 20:52:11 2011 Received: (at 8711) by debbugs.gnu.org; 24 May 2011 00:52:11 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QOfr1-0001Jn-0V for submit@debbugs.gnu.org; Mon, 23 May 2011 20:52:11 -0400 Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QOfqy-0001Jb-Pj for 8711@debbugs.gnu.org; Mon, 23 May 2011 20:52:09 -0400 Received: from 213-159-126-200.fibertel.com.ar ([200.126.159.213]:51590 helo=ceviche.home) by fencepost.gnu.org with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1QOfqt-0004YS-5W; Mon, 23 May 2011 20:52:03 -0400 Received: by ceviche.home (Postfix, from userid 20848) id 95FB5662FB; Mon, 23 May 2011 21:51:59 -0300 (ART) From: Stefan Monnier To: Helmut Eller Subject: Re: bug#8711: 24.0.50; binding _ to unused values with lexical-binding Message-ID: References: Date: Mon, 23 May 2011 21:51:59 -0300 In-Reply-To: (Helmut Eller's message of "Mon, 23 May 2011 22:32:56 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -6.0 (------) X-Debbugs-Envelope-To: 8711 Cc: 8711@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.0 (------) >> I think the same problem happens with dotimes/dolist using the old >> definition: the loop vars `key' and `value' are let-bound outside the >> loop and then setq'd at each loop iteration (it's this setq that causes >> them to be "not left unused"). This was OK for the dynamic scoping case >> because let-binding is significantly more costly than setq, but it is >> not right for the lexical scoping case where the cost of let is not >> higher than `setq' and where the semantic is actually then wrong: >> e.g. if you "collect (lambda () value)" the current code ends up >> returning a list of functions that all return the last `value', rather >> than a list of functions that each return one of the `values' in >> the alist. > BTW, is there a good reason why we can't disallow setq on closed over > variables in Elisp? Yes and no: technically, we could, of course, but I'm not sure that's worth the trouble. I'm in favor of pure languages (e.g. I've local changes that make Emacs strings immutable, often install changes that reduce the use of setq, ...) but realistically Emacs Lisp won't get rid of setq any time soon. Now, why single out setq on closed over variables? Note that currently closures are used internally a lot more often than you'd think, since every condition-case, unwind-protect, and catch makes its body and branches into closures. Also it's common for lambda arguments to mapcar and mapc to use setq on some closed over variable used a sort of accumulator. > That kind of mutability seems like a bad idea in a > concurrent world. Emacs has a crapload of global state, so we won't be able to wiggle around global mutability problems. Maybe every bit helps, but I'm very much unconvinced. > Closures are a new feature so we could make a conscious decision not > to introduce the problematic mutable variables. But I also want it to be as easy as possible to turn valid dynbind Elisp code into valid lexbind code, so any additional restriction needs a very good justification. Stefan From debbugs-submit-bounces@debbugs.gnu.org Mon May 23 20:56:53 2011 Received: (at 8711) by debbugs.gnu.org; 24 May 2011 00:56:54 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QOfvZ-0001Q3-Aj for submit@debbugs.gnu.org; Mon, 23 May 2011 20:56:53 -0400 Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QOfvX-0001Ps-NO for 8711@debbugs.gnu.org; Mon, 23 May 2011 20:56:52 -0400 Received: from 213-159-126-200.fibertel.com.ar ([200.126.159.213]:45003 helo=ceviche.home) by fencepost.gnu.org with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1QOfvS-0004kd-1a; Mon, 23 May 2011 20:56:46 -0400 Received: by ceviche.home (Postfix, from userid 20848) id DB015662FB; Mon, 23 May 2011 21:56:43 -0300 (ART) From: Stefan Monnier To: Helmut Eller Subject: Re: bug#8711: 24.0.50; binding _ to unused values with lexical-binding Message-ID: References: Date: Mon, 23 May 2011 21:56:43 -0300 In-Reply-To: (Helmut Eller's message of "Mon, 23 May 2011 22:16:22 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -6.0 (------) X-Debbugs-Envelope-To: 8711 Cc: 8711@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.0 (------) >> 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? > The semantic of loop (in Common Lisp) allows both variants. So the > "portable" idiom is "collect (let ((value value)) (lambda () value))". Interesting. I didn't think they'd accept the alternate semantic, which is clearly less useful and less efficient at the same time (tho maybe there are implementation strategies that may not make it that much less efficient). Stefan From debbugs-submit-bounces@debbugs.gnu.org Tue May 24 02:02:40 2011 Received: (at submit) by debbugs.gnu.org; 24 May 2011 06:02:40 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QOkhT-0001E3-IV for submit@debbugs.gnu.org; Tue, 24 May 2011 02:02:39 -0400 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QOkhR-0001Dr-OM for submit@debbugs.gnu.org; Tue, 24 May 2011 02:02:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QOkhL-0002rw-Q6 for submit@debbugs.gnu.org; Tue, 24 May 2011 02:02:32 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-3.0 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RCVD_NUMERIC_HELO, T_RP_MATCHES_RCVD, T_TO_NO_BRKTS_FREEMAIL autolearn=unavailable version=3.3.1 Received: from lists.gnu.org ([140.186.70.17]:50724) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QOkhL-0002rs-Ol for submit@debbugs.gnu.org; Tue, 24 May 2011 02:02:31 -0400 Received: from eggs.gnu.org ([140.186.70.92]:34562) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QOkhL-0003Y6-0T for bug-gnu-emacs@gnu.org; Tue, 24 May 2011 02:02:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QOkhK-0002rf-8h for bug-gnu-emacs@gnu.org; Tue, 24 May 2011 02:02:30 -0400 Received: from lo.gmane.org ([80.91.229.12]:51527) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QOkhK-0002rb-0n for bug-gnu-emacs@gnu.org; Tue, 24 May 2011 02:02:30 -0400 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1QOkh5-00044Q-FB for bug-gnu-emacs@gnu.org; Tue, 24 May 2011 08:02:15 +0200 Received: from 212.46.168.133 ([212.46.168.133]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 24 May 2011 08:02:15 +0200 Received: from eller.helmut by 212.46.168.133 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 24 May 2011 08:02:15 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: bug-gnu-emacs@gnu.org From: Helmut Eller Subject: Re: bug#8711: 24.0.50; binding _ to unused values with lexical-binding Date: Tue, 24 May 2011 08:01:44 +0200 Lines: 18 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: 212.46.168.133 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) Cancel-Lock: sha1:krK+O6jgjHCpts6pXn+asBCxtB8= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.17 X-Spam-Score: -4.3 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.2 (----) * 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 From debbugs-submit-bounces@debbugs.gnu.org Tue May 24 08:42:44 2011 Received: (at 8711) by debbugs.gnu.org; 24 May 2011 12:42:45 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QOqwd-0002FD-Ud for submit@debbugs.gnu.org; Tue, 24 May 2011 08:42:44 -0400 Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QOqwb-0002F0-AZ for 8711@debbugs.gnu.org; Tue, 24 May 2011 08:42:42 -0400 Received: from 213-159-126-200.fibertel.com.ar ([200.126.159.213]:42924 helo=ceviche.home) by fencepost.gnu.org with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1QOqwV-0002tu-RB; Tue, 24 May 2011 08:42:36 -0400 Received: by ceviche.home (Postfix, from userid 20848) id E77C8662FB; Tue, 24 May 2011 09:42:31 -0300 (ART) From: Stefan Monnier To: Helmut Eller Subject: Re: bug#8711: 24.0.50; binding _ to unused values with lexical-binding Message-ID: References: Date: Tue, 24 May 2011 09:42:31 -0300 In-Reply-To: (Helmut Eller's message of "Tue, 24 May 2011 08:01:44 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -6.0 (------) X-Debbugs-Envelope-To: 8711 Cc: 8711@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.0 (------) > ;; -*- lexical-binding: t -*- > (defun foo (x) (destructuring-bind (y &rest _) x y)) > x.el:2:1:Warning: variable `_' not left unused Ah, yes, this one. This is because CL's destructuring-bind expands the above to something like (let ((_ x) (y (prog1 (car _) (setq _ (cdr _))))) y) where _ is indeed not left unused. It also means that a closure that for (destructuring-bind (y &rest z) x (lambda () z)) the closure captures a mutated var which is something more costly (the var needs to be put inside a cons cell, leading to code along the lines of: (let ((z (list x)) (y (prog1 (car (car z)) (setcar z (cdr (car z)))))) (make-closure () [z] (car z))) Again this is a side-effect of `let' being costly in dynbind code. For lexbind code it would be better for destructuring-bind to use an additional internal var: (let (( x) (y (prog1 (car ) (setq (cdr )))) (_ )) y) Which would not generate any warning and would lead to more efficient code when the &rest var is captured by a closure. Stefan From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 02 07:18:43 2011 Received: (at 8711) by debbugs.gnu.org; 2 Jun 2011 11:18:44 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QS5vH-0001zs-Ez for submit@debbugs.gnu.org; Thu, 02 Jun 2011 07:18:43 -0400 Received: from mail-yx0-f172.google.com ([209.85.213.172]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QS5vF-0001zb-Np for 8711@debbugs.gnu.org; Thu, 02 Jun 2011 07:18:42 -0400 Received: by yxk30 with SMTP id 30so296354yxk.3 for <8711@debbugs.gnu.org>; Thu, 02 Jun 2011 04:18:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type; bh=6VXGV6o9hXFw0ElsraqeaEoo/2tz0wQ131jkC1hSLd8=; b=FYi++23eh5M1ZEsFJLgya+OSqYFxmUbuuKdoVgX7adYFF1P75L28GcACl8cnrgDivm QzpcxW2Lv09LVgWH2m1qZOnCoocKvh6pCqvEUtRaLdOqdAASYLAbd/VudomUaiy5cu0t gJ9s9j4DtoQZJkmjRWwNuAE/578e7vsE+VX3w= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; b=QiScWFbGj87yaQbBaPS6S82Hklch7jFnoKau6ZVxpaz/6GBIcPUADKdTIVVUzZHZOd 43sY4tge+E3adUDWjNSEaRWx2xkVomzMU72yK1UbSAWk9MDKpv+Wu8RRY/2PVJ6rZxw+ it/7rRJpU2iwTT/iHiQwinckVVoWjzmyaDk8s= Received: by 10.236.182.103 with SMTP id n67mr719746yhm.26.1307013516117; Thu, 02 Jun 2011 04:18:36 -0700 (PDT) MIME-Version: 1.0 Received: by 10.146.82.11 with HTTP; Thu, 2 Jun 2011 04:17:56 -0700 (PDT) In-Reply-To: References: From: Juanma Barranquero Date: Thu, 2 Jun 2011 13:17:56 +0200 Message-ID: Subject: Re: bug#8711: 24.0.50; binding _ to unused values with lexical-binding To: Stefan Monnier Content-Type: text/plain; charset=UTF-8 X-Spam-Score: -3.3 (---) X-Debbugs-Envelope-To: 8711 Cc: 8711@debbugs.gnu.org, Helmut Eller X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.3 (---) Speaking of unexpected warnings in lexical code: (let (new-list) (dolist (item list (nreverse new-list)) (when (not (funcall predicate item)) (setq new-list (cons item new-list))))) In toplevel form: doc-view.el:614:1:Warning: Unused lexical variable `item' Wrote c:/emacs/trunk/lisp/doc-view.elc but it does not happen if the RESULT of `dolist' is moved outside: (let (new-list) (dolist (item list) (when (not (funcall predicate item)) (setq new-list (cons item new-list)))) (nreverse new-list)) Apparently, the macroexpansion of `dolist' invokes RESULT as (setq VAR nil) RESULT or, in the cl-macs `dolist', as (let ((VAR nil)) RESULT) which I suppose has been doing for decades, but is still a bit strange. The docstring for `dolist' does not say that VAR is set to nil before computing RESULT. If computing RESULT needed the last VAR, the current code precludes it (unless it requires VAR to be nil, of course ;-) And, if computing RESULT requieres an outside VAR, the programmer is going to be forced to use this anyway: (let ((VAR 'myval)) (dolist (VAR mylist) ...) (compute-my-result VAR)) ;; with the let-bound VAR, not the dolist-bound one so setting it to nil in the (dolist (VAR LIST RESULT) ...) case does not bring any clear benefit, even in the non-lexical case. Or am I missing something obvious? From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 02 08:45:21 2011 Received: (at 8711) by debbugs.gnu.org; 2 Jun 2011 12:45:21 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QS7H7-0004oT-BJ for submit@debbugs.gnu.org; Thu, 02 Jun 2011 08:45:21 -0400 Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QS7H5-0004oG-45 for 8711@debbugs.gnu.org; Thu, 02 Jun 2011 08:45:20 -0400 Received: from 121-249-126-200.fibertel.com.ar ([200.126.249.121]:17050 helo=ceviche.home) by fencepost.gnu.org with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1QS7Gz-0004l8-Mc; Thu, 02 Jun 2011 08:45:13 -0400 Received: by ceviche.home (Postfix, from userid 20848) id D891C660DD; Thu, 2 Jun 2011 09:45:09 -0300 (ART) From: Stefan Monnier To: Juanma Barranquero Subject: Re: bug#8711: 24.0.50; binding _ to unused values with lexical-binding Message-ID: References: Date: Thu, 02 Jun 2011 09:45:09 -0300 In-Reply-To: (Juanma Barranquero's message of "Thu, 2 Jun 2011 13:17:56 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -6.0 (------) X-Debbugs-Envelope-To: 8711 Cc: 8711@debbugs.gnu.org, Helmut Eller X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.0 (------) > Apparently, the macroexpansion of `dolist' invokes RESULT as > (setq VAR nil) > RESULT > or, in the cl-macs `dolist', as > (let ((VAR nil)) > RESULT) > which I suppose has been doing for decades, but is still a bit > strange. That's how dolist/dotimes are defined in Common-Lisp, hence that's how it works in cl-macs. The subr versions also do it because when we introduced them, some people brought up the issue and it seemed there was no point in being incompatible. > The docstring for `dolist' does not say that VAR is set to > nil before computing RESULT. Indeed. > If computing RESULT needed the last VAR, the current code precludes it > (unless it requires VAR to be nil, of course ;-) Yes, I do find it very odd as well, but CLHS says clearly "At the time result-form is processed, var is bound to nil". > And, if computing RESULT requieres an outside VAR, the programmer is > going to be forced to use this anyway: > (let ((VAR 'myval)) > (dolist (VAR mylist) > ...) > (compute-my-result VAR)) ;; with the let-bound VAR, not the dolist-bound one Or she can just use different names rather than reusing the same variable name. > so setting it to nil in the (dolist (VAR LIST RESULT) ...) case does > not bring any clear benefit, even in the non-lexical case. Agreed. Stefan From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 02 09:42:20 2011 Received: (at 8711) by debbugs.gnu.org; 2 Jun 2011 13:42:20 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QS8AF-000622-II for submit@debbugs.gnu.org; Thu, 02 Jun 2011 09:42:19 -0400 Received: from mail-gw0-f44.google.com ([74.125.83.44]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QS8AE-00061q-7Y for 8711@debbugs.gnu.org; Thu, 02 Jun 2011 09:42:18 -0400 Received: by gwb20 with SMTP id 20so346420gwb.3 for <8711@debbugs.gnu.org>; Thu, 02 Jun 2011 06:42:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type:content-transfer-encoding; bh=FGfP16zjzJHMKZFHJXr6/vzDljTQ98Gqi1Urwm3V/Jk=; b=TwuNWlp6ZbSEp4CMayPyfCPjVZe89gdenDxLxr9+N9FffRZzpygPfq01rfT6dSbiQ0 el7j+xrWiJvSZOJfYBz2dWIHpYfIuj346tSq2BM8xydSHcDKMU8bazaHz0Y+hdfl3U4l BRDq7vSB6q8Q8UZB0Hc+MBvcsnE7Br8QOFfYo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; b=ldhncYxNYO8dbEMt/7WBtUp7Vu2m+BCVHbcLMznjax1a+6Rl2gHkcXYXaOJifzM+VK mbPNP2tEUWGBs32q1UdbOuVed/1hbbqpibma0QnnpaauhZgCNCgv7X+2g6N8Y6N3zWNi 8Zq5JMfOFAH2Ad8QGWPYDWhouLp3EBaTkVA7Q= Received: by 10.150.170.2 with SMTP id s2mr778479ybe.16.1307022132299; Thu, 02 Jun 2011 06:42:12 -0700 (PDT) MIME-Version: 1.0 Received: by 10.146.82.11 with HTTP; Thu, 2 Jun 2011 06:41:32 -0700 (PDT) In-Reply-To: References: From: Juanma Barranquero Date: Thu, 2 Jun 2011 15:41:32 +0200 Message-ID: Subject: Re: bug#8711: 24.0.50; binding _ to unused values with lexical-binding To: Stefan Monnier Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -3.5 (---) X-Debbugs-Envelope-To: 8711 Cc: 8711@debbugs.gnu.org, Helmut Eller X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.5 (---) On Thu, Jun 2, 2011 at 14:45, Stefan Monnier wro= te: > That's how dolist/dotimes are defined in Common-Lisp, hence that's > how it works in cl-macs. =C2=A0The subr versions also do it because when = we > introduced them, some people brought up the issue and it seemed there > was no point in being incompatible. I wonder what kind of code (other than a specific test) makes this incompatibility noticeable in the first place... but I digress ;-) > Yes, I do find it very odd as well, but CLHS says clearly "At the time > result-form is processed, var is bound to nil". Silly me, I should've checked the CLHS. I would still be puzzled, but at least not by Emacs. > Or she can just use different names rather than reusing the same > variable name. Yeah, that too. >> so setting it to nil in the (dolist (VAR LIST RESULT) ...) case does >> not bring any clear benefit, even in the non-lexical case. > > Agreed. Well, at the very least that's something that could/should be optimized away (at some point in the future, I mean) in the lexical-binding case (I think we already have some macros that expand to different code for lexical and non-lexical compilations?). Meanwhile, will you complain if I change that particular case (in doc-view.el) to be like (let (...) (dolist (var list) ...) result) to avoid the warning? =C2=A0 =C2=A0 Juanma From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 02 10:00:46 2011 Received: (at 8711) by debbugs.gnu.org; 2 Jun 2011 14:00:46 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QS8S5-0006VP-R4 for submit@debbugs.gnu.org; Thu, 02 Jun 2011 10:00:46 -0400 Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QS8S3-0006VC-Tp for 8711@debbugs.gnu.org; Thu, 02 Jun 2011 10:00:44 -0400 Received: from 121-249-126-200.fibertel.com.ar ([200.126.249.121]:18854 helo=ceviche.home) by fencepost.gnu.org with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1QS8Ry-0000Ve-0i; Thu, 02 Jun 2011 10:00:38 -0400 Received: by ceviche.home (Postfix, from userid 20848) id 2D05D660DD; Thu, 2 Jun 2011 11:00:34 -0300 (ART) From: Stefan Monnier To: Juanma Barranquero Subject: Re: bug#8711: 24.0.50; binding _ to unused values with lexical-binding Message-ID: References: Date: Thu, 02 Jun 2011 11:00:34 -0300 In-Reply-To: (Juanma Barranquero's message of "Thu, 2 Jun 2011 15:41:32 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -6.0 (------) X-Debbugs-Envelope-To: 8711 Cc: 8711@debbugs.gnu.org, Helmut Eller X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.0 (------) > Meanwhile, will you complain if I change that particular case (in > doc-view.el) to be like > (let (...) > (dolist (var list) > ...) > result) > to avoid the warning? I don't know which particular case you're referring to, but I've already installed such changes under the banner "silence compiler warnings". So yes, by all means, Stefan From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 02 13:11:11 2011 Received: (at 8711) by debbugs.gnu.org; 2 Jun 2011 17:11:11 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QSBQN-0002YX-8J for submit@debbugs.gnu.org; Thu, 02 Jun 2011 13:11:11 -0400 Received: from mail-yi0-f44.google.com ([209.85.218.44]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QSBQL-0002YJ-LW for 8711@debbugs.gnu.org; Thu, 02 Jun 2011 13:11:10 -0400 Received: by yic13 with SMTP id 13so444539yic.3 for <8711@debbugs.gnu.org>; Thu, 02 Jun 2011 10:11:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type:content-transfer-encoding; bh=FRynWYQP/t8FgY7xocWiXwLK+VwGJgxXAS7Zrue5tFY=; b=J1Pfv4E3vIOEH619wtqZ+PRhInnmsmDP9QH/wGquYZaot41wo91fCCxfjLQUqntQX3 xSNuFhrPVMOT79FilvfBa/l/p2yIHvyxFOXZzDhWk+5lfSad26zHIN7p5KJPNpIrAwh5 t6aEcExAh96g4yRy6WUNKtdJPIm7leQ6N51zo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; b=uAQTdAGdryAH5lApS4FZmpX4WnnMSR48eT19P0hULKABuZvnLJXHpAeHD4gXPzInXZ fGnrfVlbGfUZyMxkV04OTdlqnmxBCxk7dpFIQgvgQq7/WXk0JM2VnR2ZiWFJYnvluKQ1 NSOQE0z7ol3AXvdnalGQD++H+lv+kjFVxiDkY= Received: by 10.236.184.165 with SMTP id s25mr1263981yhm.227.1307034664091; Thu, 02 Jun 2011 10:11:04 -0700 (PDT) MIME-Version: 1.0 Received: by 10.146.82.11 with HTTP; Thu, 2 Jun 2011 10:10:24 -0700 (PDT) In-Reply-To: References: From: Juanma Barranquero Date: Thu, 2 Jun 2011 19:10:24 +0200 Message-ID: Subject: Re: bug#8711: 24.0.50; binding _ to unused values with lexical-binding To: Stefan Monnier Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -3.3 (---) X-Debbugs-Envelope-To: 8711 Cc: 8711@debbugs.gnu.org, Helmut Eller X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.3 (---) On Thu, Jun 2, 2011 at 16:00, Stefan Monnier wro= te: > I don't know which particular case you're referring to The one I described earlier: C:\emacs\trunk> bin\emacs.exe -batch -Q -f batch-byte-compile lisp\doc-view= .el In toplevel form: doc-view.el:614:1:Warning: Unused lexical variable `item' Wrote c:/emacs/trunk/lisp/doc-view.elc where line 614 points to this function: (defun doc-view-remove-if (predicate list) "Return LIST with all items removed that satisfy PREDICATE." (let (new-list) (dolist (item list (nreverse new-list)) (when (not (funcall predicate item)) (setq new-list (cons item new-list)))))) =C2=A0 =C2=A0 Juanma From debbugs-submit-bounces@debbugs.gnu.org Wed May 17 07:58:03 2017 Received: (at control) by debbugs.gnu.org; 17 May 2017 11:58:03 +0000 Received: from localhost ([127.0.0.1]:49647 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dAxad-0001AR-KS for submit@debbugs.gnu.org; Wed, 17 May 2017 07:58:03 -0400 Received: from mail-it0-f41.google.com ([209.85.214.41]:38543) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dAxab-00019w-CE for control@debbugs.gnu.org; Wed, 17 May 2017 07:58:01 -0400 Received: by mail-it0-f41.google.com with SMTP id e65so7335839ita.1 for ; Wed, 17 May 2017 04:58:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:subject:date:message-id:mime-version; bh=CJIW9tOMkwNy0vmnMuMcFEvGDAUHYniz8QjPKyYz8PE=; b=V1kjvJnGjWc/XoyMy8vY59P6smBcFCTRMiVeX7AjkCZ5zNXuFB8EG5X+owr/XQ30e8 w1htMRO6XgPheDH29JCuVPiItg1uVXPbYCrN0YEEOH9kg9QsHCNIaT2vUE1pcFsvC8gv mYd/sMYsXIYuVzvndFrtl0xiYNMG4tvGtSoADsYH3SAcJn6ARCFaXwbM90eQmUYeVhqc 1UiAE3LoFutyYZOA2CrvX50cd0JBDyAnt5cCLO4Sv6hxA43BcI/WWtz2KRLCLZeGWHOf A75kZ0laq7NewsX8RqGrmGT17nNYTDSvUI4Rn9N7HhQC5D3W8/h4DH60qCO0AwU7lA+c HRqg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:subject:date:message-id :mime-version; bh=CJIW9tOMkwNy0vmnMuMcFEvGDAUHYniz8QjPKyYz8PE=; b=Z8/vmV9oH5pajufPg/6qhmrozBzvmbE6MtMHOjFSUNXJQ2aSlNFZuTmEVFoT0rQOu0 mquLZE4sS0Qt2s+WiVhiyXT2jVBHHqj4o1ONWks2jUc3KRbrU3dVJmcrOqY0YUnkAxzG dqSialiRdBThwjMmlrjqegOrVEGymjxN7VThltnDJRNLhQZ5ceUiLjyARoqheD7gL80a ZOkDExMwhXAsuH1AP8YLEENXOZ/PLVazbFRYM/tPFx9QtO+vrQTSZVJl+/vY66/pG/9i E1Dzsp8iOr/mRSMseHVNM4igksR+ZfgKUVYylI0XFKhjH2ULRotOEAlSwgr5nJgCPy1n WZIg== X-Gm-Message-State: AODbwcBkm6j/zqemeR1TcTcAkqUVZd2FP8tq4nxBUr8179WZdqHSV8u9 JirNUZl1ZWLq6GZd X-Received: by 10.36.137.213 with SMTP id s204mr3494501itd.64.1495022275435; Wed, 17 May 2017 04:57:55 -0700 (PDT) Received: from zony ([45.2.7.65]) by smtp.googlemail.com with ESMTPSA id b69sm1036988itb.23.2017.05.17.04.57.53 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 17 May 2017 04:57:54 -0700 (PDT) From: npostavs@users.sourceforge.net To: control@debbugs.gnu.org Subject: control message for bug #8711 - unused vars in cl-destructuring-bind Date: Wed, 17 May 2017 07:59:30 -0400 Message-ID: <87k25fiti5.fsf@users.sourceforge.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.7 (/) forcemerge 8711 26960 quit From debbugs-submit-bounces@debbugs.gnu.org Sun May 08 08:34:02 2022 Received: (at 8711) by debbugs.gnu.org; 8 May 2022 12:34:03 +0000 Received: from localhost ([127.0.0.1]:53627 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nng6s-0002FU-Ii for submit@debbugs.gnu.org; Sun, 08 May 2022 08:34:02 -0400 Received: from quimby.gnus.org ([95.216.78.240]:58714) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nng6q-0002Ep-FI; Sun, 08 May 2022 08:34:01 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=zwJWhz3b7cjiE72Val0Z80xctSspr5cXCYgN3zUaIN8=; b=PsHpgYw736VzwCvHIXgY1WN8i9 S4u5/Ug4zmtt9qXH6wpY2aSWk/zHY/9L3SWrTTF7r0W/vzcf3PrDngFdQaflCQg0jxH2IYEMmk4d1 AVpEzKQw8uRKBwB1cdNCdgUxtajrZuntyNztZbcCMrUZ8dXaFLTM/ZfK1/gfVCK6dPsU=; Received: from [84.212.220.105] (helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nng6g-0008QD-6s; Sun, 08 May 2022 14:33:52 +0200 From: Lars Ingebrigtsen To: Helmut Eller Subject: Re: bug#26960: 26.0.50; Complaints about unused variable in cl-destructuring-bind References: X-Now-Playing: Adult.'s _Becoming Undone_: "Undoing-Undone" Date: Sun, 08 May 2022 14:33:49 +0200 In-Reply-To: (Helmut Eller's message of "Sat, 21 May 2011 20:44:18 +0200") Message-ID: <871qx4i4pe.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Helmut Eller writes: > There seems be no way to avoid a warning in code like this: > > ;; -*- lexical-binding: t -*- > (eval-when-compile (require 'cl)) > (defun foo (x) (destructuring-bind (_) x)) > (defun bar (x) (destr [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 8711 Cc: 26960@debbugs.gnu.org, 8711@debbugs.gnu.org, Stefan Monnier X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Helmut Eller writes: > There seems be no way to avoid a warning in code like this: > > ;; -*- lexical-binding: t -*- > (eval-when-compile (require 'cl)) > (defun foo (x) (destructuring-bind (_) x)) > (defun bar (x) (destructuring-bind (_) x (ignore _))) > > In foo the compiler complains because _ is never used and > it bar it complains because it is used. (I'm going through old bug reports that unfortunately weren't resolved at the time.) I can reproduce this in Emacs 25.1, but not in Emacs 29. That is, there's no warning for `foo'. There's still a warning for `bar', but that's correct, isn't it? `ignore' is just a normal function, so _ is used there. However, this example from a merged bug report is giving a warning: > ;;; -*- lexical-binding: t; -*- > (require 'cl-lib) > (cl-destructuring-bind (&whole a b &rest _) '(1 2) > (print (list a b))) And that seems like a bug? -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Sun May 08 09:32:13 2022 Received: (at 8711) by debbugs.gnu.org; 8 May 2022 13:32:14 +0000 Received: from localhost ([127.0.0.1]:53718 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nnh1B-00088A-Dq for submit@debbugs.gnu.org; Sun, 08 May 2022 09:32:13 -0400 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:64218) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nnh18-00087o-5k; Sun, 08 May 2022 09:32:11 -0400 Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 7DD0910029F; Sun, 8 May 2022 09:32:04 -0400 (EDT) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 6EC12100118; Sun, 8 May 2022 09:32:02 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1652016722; bh=bwEaiuLPK3lfPJ7EMHW9+8gUMfFgpddY1m+lLaIo3nk=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=ZLqO3HDStwGn35NYJEbil16JU1q3gC7aQwXGfjaVAr7UTvwtQVz7aws0S0pqQIvbA TJESaTJ8WHUzVvwnPAC6fJ6pV0LLbO1Fd9dUM61mbt4iIIDvF05vSHpruvswL4IXds oiKFpXHO6Zz6h9HFVfNjE8isK1xtyRTCOkrfGCzm4LHKDlkgH9riuSWP+EYNqiEU1N cnI421FyFDXM2/zdSPgrL1Y9v+lulkgA9kkhFEbxYS6EF5CSPPxeaQl0/kqRqCsQCF iX+zNzg3XlcrtdaUkPFfjekSk+I9iEEFSW/ukeoyDlmTHJWMI9Rt7+Z6fHGG0UK+cy roA94U/Icz2HQ== Received: from pastel (unknown [45.72.221.51]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 399BF120263; Sun, 8 May 2022 09:32:02 -0400 (EDT) From: Stefan Monnier To: Lars Ingebrigtsen Subject: Re: bug#26960: 26.0.50; Complaints about unused variable in cl-destructuring-bind Message-ID: References: <871qx4i4pe.fsf@gnus.org> Date: Sun, 08 May 2022 09:32:01 -0400 In-Reply-To: <871qx4i4pe.fsf@gnus.org> (Lars Ingebrigtsen's message of "Sun, 08 May 2022 14:33:49 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.044 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain T_SCC_BODY_TEXT_LINE -0.01 - X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 8711 Cc: 26960@debbugs.gnu.org, 8711@debbugs.gnu.org, Helmut Eller X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > I can reproduce this in Emacs 25.1, but not in Emacs 29. That is, > there's no warning for `foo'. There's still a warning for `bar', but > that's correct, isn't it? Yes. > `ignore' is just a normal function, so _ is used there. It's not 100% normal, but yes. > However, this example from a merged bug report is giving a warning: > >> ;;; -*- lexical-binding: t; -*- >> (require 'cl-lib) >> (cl-destructuring-bind (&whole a b &rest _) '(1 2) >> (print (list a b))) > > And that seems like a bug? 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. It might have been useful back in the dynbinding days because `setq` might have been a bit cheaper than `let`, but with lexical scoping `let` byte-compiles to virtually nothing. Stefan From debbugs-submit-bounces@debbugs.gnu.org Mon May 09 05:25:51 2022 Received: (at 8711) by debbugs.gnu.org; 9 May 2022 09:25:51 +0000 Received: from localhost ([127.0.0.1]:56064 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nnzeI-0008Nt-TN for submit@debbugs.gnu.org; Mon, 09 May 2022 05:25:51 -0400 Received: from quimby.gnus.org ([95.216.78.240]:39618) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nnzeH-0008NW-Ir; Mon, 09 May 2022 05:25:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID :In-Reply-To:Date:References:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=mZKvtBIvk6H/f9vVa1qQLTrd3tsHAwO9bgLUg4Xy9Aw=; b=MBCfrFz7TwJZYUxVO9ViY6C7Rj shFnhW7FW8/RUEjCAmb5T9xyqGsozlzKJDt2h6+fbiq4FeWlle+Fw8uwkkZtvdVup4eMibklUJfR4 KWGs4RCjFQtkyxpWx1NCSR350M5IQ27VZ6bLL7rS3HwMlN10myBcRz/gQljVYbSQeUGM=; Received: from [84.212.220.105] (helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nnze7-0003uA-Eu; Mon, 09 May 2022 11:25:41 +0200 From: Lars Ingebrigtsen To: Stefan Monnier Subject: Re: bug#26960: 26.0.50; Complaints about unused variable in cl-destructuring-bind References: <871qx4i4pe.fsf@gnus.org> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAElBMVEXZcnO+sKni39L2 9etsd4H////mjpy1AAAAAWJLR0QF+G/pxwAAAAd0SU1FB+YFCQkSKPuxcWMAAAG0SURBVDjLlVTr mdwgDCQdBOEGJNEA0jaAc/3XlBFgw92XP5HX2IsYafRySv8tv/OQ9XjlV1JVdzd3HSse8W6exIZm Ksc+dtUlCTYEu/Fv7ONFzSSp+BbolmmDD/MfEgY06Tr5TcJ5E1EWiOEOZvOQpQrSXzn3D+7rtkXO PcVpB+cAySRt4SYxEyuzs+TMpI9DTWaHc30SoD5ZBY1xhaEZWPIXccAsTL08vokl8X3aTsU/I/fI 7hQb63ajI0AIk+Ci08eJkJ8Ijh+ywg8HtTSOcu1sdiBQqDZM1BtE6FVEoaZz7sIWWV5kgeCFsABs hG+EHqbMtymlQVd95XnFUTuWhQg/oo/itgz39Jp6fAwEMLskCPDrlV3yKNShOCIfpkj804t5zju7 GINK3Ap8cMm0GzyS2Mjpc9ufpsHqGZYkrNr40/Nt5ZJVdgmFFapeu3qz8rbMyK42LQiwtGKku4IN GvKG7HZq9KQw0l6ICl+3V21FxjjNUUN/AHPdVY0LH3RhioQ5anfNJGKWo9tZHRbMLAwdPQpWTCgE X9yNeIzBkGREu+EKjvL8mKQop8YHAeOqUD+Kv6HCuLBZHCH4AAAAJXRFWHRkYXRlOmNyZWF0ZQAy MDIyLTA1LTA5VDA5OjE4OjQwKzAwOjAwELu3MAAAACV0RVh0ZGF0ZTptb2RpZnkAMjAyMi0wNS0w OVQwOToxODo0MCswMDowMGHmD4wAAAAASUVORK5CYII= X-Now-Playing: Blaine L. Reininger & Alain Goutier's _Paris en Autumne_: "Raise Your Hands" Date: Mon, 09 May 2022 11:25:38 +0200 In-Reply-To: (Stefan Monnier's message of "Sun, 08 May 2022 09:32:01 -0400") Message-ID: <8735hjdpm5.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Stefan Monnier 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 [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 8711 Cc: 26960@debbugs.gnu.org, 8711@debbugs.gnu.org, Helmut Eller X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Stefan Monnier 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. =F0= =9F=AB=A0 In any case, I'm unmerging these two bug reports, and closing the one that's fixed. --=20 (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Mon May 09 05:26:30 2022 Received: (at control) by debbugs.gnu.org; 9 May 2022 09:26:30 +0000 Received: from localhost ([127.0.0.1]:56069 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nnzeq-0008PF-5V for submit@debbugs.gnu.org; Mon, 09 May 2022 05:26:29 -0400 Received: from quimby.gnus.org ([95.216.78.240]:39636) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nnzeo-0008P3-JD for control@debbugs.gnu.org; Mon, 09 May 2022 05:26:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=9SdV9JnKn2PInxVbm8eeIkpfvUSOwWSTigc6GkYT5qw=; b=Hp+VmODtrn/q2s+dF3l5m29Oia Le6T1kCZlWRdpEJnD4CbYY/N+S3Y9c0O8meKKJX0pPNyTfLE7WBICXERvjowE+47Gqn/SNx1xbIfz qm80k0pZbgZs6/QL6A3ieL5aL+DDJ0kGv04mpNRPLX6oDwzBeYSybP05YsGKMI5dztwY=; Received: from [84.212.220.105] (helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nnzeg-0003uW-NL for control@debbugs.gnu.org; Mon, 09 May 2022 11:26:16 +0200 Date: Mon, 09 May 2022 11:26:14 +0200 Message-Id: <871qx3dpl5.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #26960 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: unmerge 26960 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) unmerge 26960 quit From debbugs-submit-bounces@debbugs.gnu.org Mon May 09 05:27:40 2022 Received: (at control) by debbugs.gnu.org; 9 May 2022 09:27:40 +0000 Received: from localhost ([127.0.0.1]:56074 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nnzg4-0008RS-2m for submit@debbugs.gnu.org; Mon, 09 May 2022 05:27:40 -0400 Received: from quimby.gnus.org ([95.216.78.240]:39660) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nnzg2-0008RF-JI for control@debbugs.gnu.org; Mon, 09 May 2022 05:27:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=CMXUbrsKsjne97g1ti6/LWU3Pv2W3YhWDcy0rp1NVa4=; b=tIIAfiCQrKISiwP+J/N/vSYPAY aTRDnuXWHxw6Hz46dNgcV4uR5bVJ54WGlT+lzByCspfSCnNP2pn4A6mTJn+tkEcO5J7h+6BumGZrr OnvqBJUpnlElsDRyPvcdghAWqk1bRCliVjw5nu5KQDqR9aWCNO5tTQaCGXDGHuL+YbzE=; Received: from [84.212.220.105] (helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nnzfu-0003xH-Rv for control@debbugs.gnu.org; Mon, 09 May 2022 11:27:32 +0200 Date: Mon, 09 May 2022 11:27:30 +0200 Message-Id: <87tu9zcayl.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #8711 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: close 8711 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) close 8711 quit From debbugs-submit-bounces@debbugs.gnu.org Mon May 09 08:26:33 2022 Received: (at 8711) by debbugs.gnu.org; 9 May 2022 12:26:33 +0000 Received: from localhost ([127.0.0.1]:56509 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1no2TA-0004EC-RR for submit@debbugs.gnu.org; Mon, 09 May 2022 08:26:32 -0400 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:21296) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1no2T7-0004Dl-Pa; Mon, 09 May 2022 08:26:30 -0400 Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 5300D80767; Mon, 9 May 2022 08:26:24 -0400 (EDT) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 038438000B; Mon, 9 May 2022 08:26:23 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1652099183; bh=m+ZgU4RxT2w2/RS4hydurIqIwoohV2dpBDin6xUVbSs=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=mdxxVQCR5VnM4vS2UwMpuLUgia8o8vTvBeGk4PsNHm2y7tdr2qzpSCevAqwOfDVgC RdJBN3xZckIs3FXRZpEx7gOG+3xDwzhH0fayWBgQi8T/Uc9dI54N4ZdA9xj3rJuihQ oWT7H7aoSmga4YQ4+x9OR7KyUriwGmtcc9lCsYjc9YLObBXWk0/+lns1HldHMv67ds +NnE9HLkuFmH8+sfQws5n4UtEcafL8n08gjHcxJzygvdL/jt2e+d6pHY63Mlj2XczD H3UiwQUaQ+7+lZlSIqPMXmzf4kvZVTWGpDEjYgN6ZpvmhIc+uwCK+301QoUUFJj0W9 TbfWIfmBT7KWQ== Received: from pastel (unknown [45.72.221.51]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id A92A612051F; Mon, 9 May 2022 08:26:22 -0400 (EDT) From: Stefan Monnier To: Lars Ingebrigtsen Subject: Re: bug#26960: 26.0.50; Complaints about unused variable in cl-destructuring-bind Message-ID: References: <871qx4i4pe.fsf@gnus.org> <8735hjdpm5.fsf@gnus.org> Date: Mon, 09 May 2022 08:26:21 -0400 In-Reply-To: <8735hjdpm5.fsf@gnus.org> (Lars Ingebrigtsen's message of "Mon, 09 May 2022 11:25:38 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.057 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain T_SCC_BODY_TEXT_LINE -0.01 - X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 8711 Cc: 26960@debbugs.gnu.org, 8711@debbugs.gnu.org, Helmut Eller X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > 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. = =F0=9F=AB=A0 I did the same some years ago, FWIW :-) Stefan From unknown Thu Jun 19 14:05:31 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 07 Jun 2022 11:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator