From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Nathan Trapuzzano Newsgroups: gmane.emacs.bugs Subject: bug#15786: 24.3; No warning on mal-formed let form when lexical-binding Date: Sat, 02 Nov 2013 11:26:48 -0400 Message-ID: <87eh6yn7t3.fsf@nbtrap.com> References: <874n7uq4ac.fsf@nbtrap.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: ger.gmane.org 1383406098 30068 80.91.229.3 (2 Nov 2013 15:28:18 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 2 Nov 2013 15:28:18 +0000 (UTC) Cc: 15786@debbugs.gnu.org To: Leo Liu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Nov 02 16:28:22 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Vcd7e-0005hF-FR for geb-bug-gnu-emacs@m.gmane.org; Sat, 02 Nov 2013 16:28:22 +0100 Original-Received: from localhost ([::1]:42326 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vcd7e-0005yH-27 for geb-bug-gnu-emacs@m.gmane.org; Sat, 02 Nov 2013 11:28:22 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49412) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vcd7U-0005y1-FN for bug-gnu-emacs@gnu.org; Sat, 02 Nov 2013 11:28:19 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vcd7N-0005k0-Fz for bug-gnu-emacs@gnu.org; Sat, 02 Nov 2013 11:28:12 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:45609) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vcd7M-0005ju-AL for bug-gnu-emacs@gnu.org; Sat, 02 Nov 2013 11:28:05 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Vcd7K-0001wP-IR for bug-gnu-emacs@gnu.org; Sat, 02 Nov 2013 11:28:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Nathan Trapuzzano Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 02 Nov 2013 15:28:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 15786 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 15786-submit@debbugs.gnu.org id=B15786.13834060217339 (code B ref 15786); Sat, 02 Nov 2013 15:28:02 +0000 Original-Received: (at 15786) by debbugs.gnu.org; 2 Nov 2013 15:27:01 +0000 Original-Received: from localhost ([127.0.0.1]:59627 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Vcd6K-0001u0-Uw for submit@debbugs.gnu.org; Sat, 02 Nov 2013 11:27:01 -0400 Original-Received: from outbound-ss-2175.bluehost.com ([74.220.218.8]:42534) by debbugs.gnu.org with smtp (Exim 4.80) (envelope-from ) id 1Vcd6H-0001tm-0l for 15786@debbugs.gnu.org; Sat, 02 Nov 2013 11:26:58 -0400 Original-Received: (qmail 1852 invoked by uid 0); 2 Nov 2013 15:26:52 -0000 Original-Received: from unknown (HELO host393.hostmonster.com) (66.147.240.193) by oproxy16-pub.mail.unifiedlayer.com with SMTP; 2 Nov 2013 15:26:52 -0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=nbtrap.com; s=default; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:References:Subject:Cc:To:From; bh=Ng/VzEL5/081wGxxjiM6zuVQfizarMXeWKBH5pAPw4g=; b=Q1SNlbLGXWnGJXByrcAUfBokrkKLLMWBv2bmqAWE21P++Bz/bvZcyGEyROYAYH2JAllY+BA4NcRfA9fC5kuZ33rI6pNw/wyB+GkTvHemi2ofkqmBhV2Yq5v/I1WB7VJB; Original-Received: from [50.90.253.209] (port=45467 helo=Nathan-GNU) by host393.hostmonster.com with esmtpsa (TLSv1:CAMELLIA128-SHA:128) (Exim 4.80) (envelope-from ) id 1Vcd6B-0003HC-Uj; Sat, 02 Nov 2013 09:26:52 -0600 In-Reply-To: <874n7uq4ac.fsf@nbtrap.com> (Nathan Trapuzzano's message of "Sat, 02 Nov 2013 10:14:35 -0400") User-Agent: Gnus/5.130007 (Ma Gnus v0.7) Emacs/24.3.50 (gnu/linux) X-Identified-User: {1585:host393.hostmonster.com:nbtrapco:nbtrap.com} {sentby:smtp auth 50.90.253.209 authed with nbtrap@nbtrap.com} X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.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-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:79891 Archived-At: --=-=-= Content-Type: text/plain Nathan Trapuzzano writes: > Patch attached. Sorry, that patch messed up with (let ((var-with-no-value-form)) ...). Correct patch attached here. --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=cconv.el.patch >From 1cd7356af9caca830f4764205dcbd2f6afe4b6d3 Mon Sep 17 00:00:00 2001 From: Nathan Trapuzzano Date: Sat, 2 Nov 2013 10:12:35 -0400 Subject: [PATCH] Assert proper form of let binding during byte compilation under lexical binding. --- lisp/emacs-lisp/cconv.el | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/lisp/emacs-lisp/cconv.el b/lisp/emacs-lisp/cconv.el index f24e503..3fc2fc4 100644 --- a/lisp/emacs-lisp/cconv.el +++ b/lisp/emacs-lisp/cconv.el @@ -289,12 +289,14 @@ places where they originally did not directly appear." (dolist (binder binders) (let* ((value nil) - (var (if (not (consp binder)) - (prog1 binder (setq binder (list binder))) - (setq value (cadr binder)) - (car binder))) - (new-val - (cond + (var (if (not (consp binder)) + (prog1 binder (setq binder (list binder))) + (cl-assert (null (cdr (cdr binder))) nil + "malformed let binding: `%s'" (prin1-to-string binder)) + (setq value (cadr binder)) + (car binder))) + (new-val + (cond ;; Check if var is a candidate for lambda lifting. ((and (member (cons binder form) cconv-lambda-candidates) (progn -- 1.8.4.2 --=-=-=--