From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tom Tromey Newsgroups: gmane.emacs.bugs Subject: bug#18971: 25.0.50; incorrect warning from byte compiler Date: Thu, 06 Nov 2014 08:46:40 -0700 Message-ID: <87h9ycuyan.fsf@tromey.com> References: <87egthoti4.fsf@tromey.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1415288849 15493 80.91.229.3 (6 Nov 2014 15:47:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 6 Nov 2014 15:47:29 +0000 (UTC) Cc: 18971@debbugs.gnu.org, Tom Tromey To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Nov 06 16:47:23 2014 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 1XmPHN-0002eH-8Y for geb-bug-gnu-emacs@m.gmane.org; Thu, 06 Nov 2014 16:47:21 +0100 Original-Received: from localhost ([::1]:54505 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XmPHM-000644-S4 for geb-bug-gnu-emacs@m.gmane.org; Thu, 06 Nov 2014 10:47:20 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34884) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XmPHC-0005ud-8s for bug-gnu-emacs@gnu.org; Thu, 06 Nov 2014 10:47:16 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XmPH5-0002La-7B for bug-gnu-emacs@gnu.org; Thu, 06 Nov 2014 10:47:10 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:54790) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XmPH5-0002LW-14 for bug-gnu-emacs@gnu.org; Thu, 06 Nov 2014 10:47:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1XmPH4-0004sa-S2 for bug-gnu-emacs@gnu.org; Thu, 06 Nov 2014 10:47:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Tom Tromey Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 06 Nov 2014 15:47:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 18971 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 18971-submit@debbugs.gnu.org id=B18971.141528882118748 (code B ref 18971); Thu, 06 Nov 2014 15:47:02 +0000 Original-Received: (at 18971) by debbugs.gnu.org; 6 Nov 2014 15:47:01 +0000 Original-Received: from localhost ([127.0.0.1]:52002 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XmPH3-0004sE-6t for submit@debbugs.gnu.org; Thu, 06 Nov 2014 10:47:01 -0500 Original-Received: from gproxy6-pub.mail.unifiedlayer.com ([67.222.39.168]:53332) by debbugs.gnu.org with smtp (Exim 4.80) (envelope-from ) id 1XmPH0-0004s5-On for 18971@debbugs.gnu.org; Thu, 06 Nov 2014 10:46:59 -0500 Original-Received: (qmail 26142 invoked by uid 0); 6 Nov 2014 15:46:54 -0000 Original-Received: from unknown (HELO cmgw3) (10.0.90.84) by gproxy6.mail.unifiedlayer.com with SMTP; 6 Nov 2014 15:46:54 -0000 Original-Received: from box522.bluehost.com ([74.220.219.122]) by cmgw3 with id CMmj1p01S2f2jeq01Mmmzn; Thu, 06 Nov 2014 14:46:53 -0700 X-Authority-Analysis: v=2.1 cv=ON60g0qB c=1 sm=1 tr=0 a=GsOEXm/OWkKvwdLVJsfwcA==:117 a=GsOEXm/OWkKvwdLVJsfwcA==:17 a=cNaOj0WVAAAA:8 a=f5113yIGAAAA:8 a=udL4O0NGDEAA:10 a=zstS-IiYAAAA:8 a=PnD2wP_eR3oA:10 a=X1qvojbhiZEA:10 a=-TvgQ5XiIAXCvgoin0gA:9 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:References:Subject:Cc:To:From; bh=I4uJ5VP5lnnp0qLmyrJkrMGu7xhLK7I/9aBipHy0KGA=; b=B/xKFTfDNxEEt/i98ziSCnQVTZjrihI0Xx6y90bXGG+oARKfRhTVvL202n/5P2+CEPZIl2hzbcFTTyvAwFTllDIQ1hDkwplf8+j7FuZ1O+l2U1UexBvFW7ajF8jSx7WJ; Original-Received: from [71.33.139.67] (port=51416 helo=pokyo) by box522.bluehost.com with esmtpsa (TLSv1.2:AES128-GCM-SHA256:128) (Exim 4.82) (envelope-from ) id 1XmPGm-0004L0-FT; Thu, 06 Nov 2014 08:46:44 -0700 X-Attribution: Tom In-Reply-To: (Stefan Monnier's message of "Thu, 06 Nov 2014 10:29:54 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) X-Identified-User: {36111:box522.bluehost.com:elynrobi:tromey.com} {sentby:smtp auth 71.33.139.67 authed with tom+tromey.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:95620 >>>>> "Stefan" == Stefan Monnier writes: >> ; -*- lexical-binding:t -*- >> (require 'bytecomp) >> (defun z () >> (byte-compile-close-variables >> (message "hi"))) Stefan> If it hurts, don't do that. Stefan> `byte-compile-close-variables' is an internal macro in bytecomp.el. Stefan> Why do you need to use it elsewhere? I want to be able to call byte-optimize-form and was under the impression that byte-compile-close-variables was needed. I'm doing this for a project I'm working on where it is convenient to let the byte compiler code macroexpand a form and do some simple optimizations on it. I guess I don't understand why this would not be a bug, though. Or at least it perplexes me why this happens; my only theory is that somehow the defvars aren't seen when byte-compiling my file. I suppose if I wanted to export a macro like this, I would need it to come with special declarations for the variables? Except I didn't see a way to do that either. Tom