From: Tom Tromey <tom@tromey.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: 18971@debbugs.gnu.org, Tom Tromey <tom@tromey.com>
Subject: bug#18971: 25.0.50; incorrect warning from byte compiler
Date: Thu, 06 Nov 2014 08:46:40 -0700 [thread overview]
Message-ID: <87h9ycuyan.fsf@tromey.com> (raw)
In-Reply-To: <jwv8ujoqreh.fsf-monnier+emacsbugs@gnu.org> (Stefan Monnier's message of "Thu, 06 Nov 2014 10:29:54 -0500")
>>>>> "Stefan" == Stefan Monnier <monnier@iro.umontreal.ca> 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
next prev parent reply other threads:[~2014-11-06 15:46 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-06 4:14 bug#18971: 25.0.50; incorrect warning from byte compiler Tom Tromey
2014-11-06 15:29 ` Stefan Monnier
2014-11-06 15:46 ` Tom Tromey [this message]
2014-11-06 23:27 ` Stefan Monnier
2014-12-29 19:40 ` Tom Tromey
2014-12-30 2:48 ` Stefan Monnier
2019-06-12 15:11 ` Lars Ingebrigtsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87h9ycuyan.fsf@tromey.com \
--to=tom@tromey.com \
--cc=18971@debbugs.gnu.org \
--cc=monnier@iro.umontreal.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.