From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: npostavs@users.sourceforge.net Newsgroups: gmane.emacs.bugs Subject: bug#24641: 26.0.50; let-alist: Incorrect byte-compile warning about unused lexical variable Date: Sat, 08 Oct 2016 09:09:52 -0400 Message-ID: <87fuo7vvfj.fsf@users.sourceforge.net> References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1475932238 28178 195.159.176.226 (8 Oct 2016 13:10:38 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 8 Oct 2016 13:10:38 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) Cc: 24641@debbugs.gnu.org To: Philipp Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Oct 08 15:10:34 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bsrOP-0005Gg-H6 for geb-bug-gnu-emacs@m.gmane.org; Sat, 08 Oct 2016 15:10:21 +0200 Original-Received: from localhost ([::1]:41090 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bsrOO-0006kO-4d for geb-bug-gnu-emacs@m.gmane.org; Sat, 08 Oct 2016 09:10:20 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:32809) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bsrOB-0006bw-0r for bug-gnu-emacs@gnu.org; Sat, 08 Oct 2016 09:10:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bsrO6-0001td-Q0 for bug-gnu-emacs@gnu.org; Sat, 08 Oct 2016 09:10:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:42175) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bsrO6-0001tW-Lx for bug-gnu-emacs@gnu.org; Sat, 08 Oct 2016 09:10:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bsrO6-00075F-Je for bug-gnu-emacs@gnu.org; Sat, 08 Oct 2016 09:10:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: npostavs@users.sourceforge.net Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 08 Oct 2016 13:10:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24641 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 24641-submit@debbugs.gnu.org id=B24641.147593216527167 (code B ref 24641); Sat, 08 Oct 2016 13:10:02 +0000 Original-Received: (at 24641) by debbugs.gnu.org; 8 Oct 2016 13:09:25 +0000 Original-Received: from localhost ([127.0.0.1]:48364 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bsrNV-000742-Gx for submit@debbugs.gnu.org; Sat, 08 Oct 2016 09:09:25 -0400 Original-Received: from mail-it0-f50.google.com ([209.85.214.50]:38774) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bsrNU-00073d-8R; Sat, 08 Oct 2016 09:09:24 -0400 Original-Received: by mail-it0-f50.google.com with SMTP id o19so40949839ito.1; Sat, 08 Oct 2016 06:09:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=0oi2oTPS9d8i37J5iG7PHgyXpWbiACRX/Nv4oKAUDSc=; b=clj0L4saPq4UZXXWbo3z+yEgrdmIJdHyU5ZTIQtZKdPGKftcyBNTsEZEq2Jk3MQnQZ CCWss/6+RblOWI48pvF3qfxFMBnvAQSXnCNxix5CBrjGgVrzyCQEdbCK+jTOfNrTpRoP s6/x1lTyF5A2tjOVeBdNKvTAPsyvB8AO8HLNKrtRddncRWhb061it8LiZm2VtUjE+z34 UK/iFXla9OY/r+QejUX9ISFWenneMWzkGBs2LWH4amtNCUIy5fnugKHoDCCZLuFks1J4 xgqsBRvYyw8xVr1ex1Q3W+/9cMBJcF/ANeLZgSlMhWH9sszujWxRol8SYmP5yD+HAZm5 PHhg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version :content-transfer-encoding; bh=0oi2oTPS9d8i37J5iG7PHgyXpWbiACRX/Nv4oKAUDSc=; b=HWlc+ax1wumcP52Snq9qzQbtFRTZyvMszumFMUEP9+wkh+7wyKLsTjT6eygMzLWFgl zTkzKRUeUelOBS802Y51v8ok6p8XZ1D6YcSZccRK/Dgzy5VvoKngw+NpDx46sT9hcJn8 pXTlUjy83BYZ69+zwG8X7mnXdIPwtjo3/q8+ubWRVcAr024F9moOxbvij9QVt1luG9JK VUV+h8EGxUlayOsZzRSrz5xdpK+EsasuTQTwG5xYbAOsyBAGJsCM0EyrMDMP0i9Fb83J KCkAWC6hWVhtNIPgemqafs3FL82zCArvYanHN8x7cFBDvPy+Vo10q7aFpdtsQI74gRFr Xwdw== X-Gm-Message-State: AA6/9Rl8g3LtwY5tANi9WS07H49TwrbFxqJXvX6rAC9+VE2rNPu8LAi3wsXhXmfKjFnh7Q== X-Received: by 10.36.108.19 with SMTP id w19mr1834264itb.115.1475932158791; Sat, 08 Oct 2016 06:09:18 -0700 (PDT) Original-Received: from zony ([45.2.7.130]) by smtp.googlemail.com with ESMTPSA id c9sm9500031ioc.26.2016.10.08.06.09.17 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 08 Oct 2016 06:09:18 -0700 (PDT) In-Reply-To: (Philipp's message of "Sat, 08 Oct 2016 14:43:03 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:124200 Archived-At: retitle 24641 let-alist redundantly binds variables already bound by nested= let-alist calls severity 24641 minor tags 24641 confirmed quit Philipp writes: > $ cat /tmp/letalist.el=20 > ;; -*- lexical-binding: t; -*- > (print > (let-alist '((outer . ((inner . value)))) > (let-alist .outer .inner))) >=20=20=20=20 > $ emacs -Q -batch -f batch-byte-compile /tmp/letalist.el=20 > > In toplevel form: > /tmp/letalist.el:2:1:Warning: Unused lexical variable =E2=80=98\.inner=E2= =80=99 > > This warning is incorrect because '.inner' is used in the inner > let-alist form. The byte compiler warning correct, the problem is in let-alist: both the outer and inner let-alist calls let-bind '.inner'. Here is the macroexpansion: (let ((#1=3D#:alist '((outer (inner . value))))) (let ((\.outer (cdr (assq 'outer #1#))) (\.inner ; <------------ this one is unused (cdr (assq 'inner #1#)))) (let ((#2=3D#:alist \.outer)) (let ((\.inner (cdr (assq 'inner #2#)))) \.inner))))