GNU bug report logs - #18971
25.0.50; incorrect warning from byte compiler

Previous Next

Package: emacs;

Reported by: Tom Tromey <tom <at> tromey.com>

Date: Thu, 6 Nov 2014 04:16:02 UTC

Severity: minor

Tags: wontfix

Found in version 25.0.50

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Tom Tromey <tom <at> tromey.com>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 18971 <at> debbugs.gnu.org, Tom Tromey <tom <at> tromey.com>
Subject: bug#18971: 25.0.50; incorrect warning from byte compiler
Date: Thu, 06 Nov 2014 08:46:40 -0700
>>>>> "Stefan" == Stefan Monnier <monnier <at> 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




This bug report was last modified 5 years and 344 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.