bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#18971: 25.0.50; incorrect warning from byte compiler


From: Tom Tromey
Subject: bug#18971: 25.0.50; incorrect warning from byte compiler
Date: Thu, 06 Nov 2014 08:46:40 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

>>>>> "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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]