unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Dan Nicolaescu <dann@ics.uci.edu>
To: emacs-devel@gnu.org
Subject: Re: strange byte compiler behavior
Date: Wed, 02 Jan 2008 11:48:18 -0800	[thread overview]
Message-ID: <200801021948.m02JmJ1Y005211@oogie-boogie.ics.uci.edu> (raw)
In-Reply-To: <200712312055.lBVKteSa012881@oogie-boogie.ics.uci.edu> (Dan Nicolaescu's message of "Mon, 31 Dec 2007 12:55:40 -0800")

Dan Nicolaescu <dann@ics.uci.edu> writes:

  > When compiling vc-cvs in batch mode (cd emacs/lisp; make recompile) 
  > no warning is issued. 
  > 
  > When compiling it with M-x byte-compile-file this warning is issued:
  > 
  > In vc-cvs-register:
  > vc-cvs.el:301:41:Warning: reference to free variable `file'
  > 
  > 
  > The warning is correct, it looks like vc-cvs-register has a bug, it
  > should look at `files', not `file'.
  > 
  > Any idea why this warning is not issued in batch mode?


Investigating a bit: 

1. 
cd lisp ; make recompile 

which runs: -batch --no-site-file --multibyte --eval "(batch-byte-recompile-directory 0)"
does NOT warn

but running: 

-batch --no-site-file --multibyte --eval '(byte-compile-file "vc-cvs.el")'

warns

2. the warning is related to the name `file', if the variable is renamed
`file1' both the batch mode and interactive mode produce a warning.

3. Adding this:

   (message "var %s boundp %s" var  (boundp var))
to `byte-compile-variable-ref' shows that `file' is bound for the function
in question.  Which would explain the results. 
Any idea what causes `file' to be bound? (Assuming that boundp is the
correct test in that context...)

  parent reply	other threads:[~2008-01-02 19:48 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-31 20:55 strange byte compiler behavior Dan Nicolaescu
2007-12-31 21:37 ` martin rudalics
2007-12-31 22:11   ` Dan Nicolaescu
2007-12-31 22:30     ` martin rudalics
2007-12-31 22:42       ` Dan Nicolaescu
2008-01-01 10:33         ` martin rudalics
2008-01-02 19:48 ` Dan Nicolaescu [this message]
2008-01-02 21:49   ` martin rudalics
2008-01-02 22:13     ` Dan Nicolaescu
2008-01-02 23:17   ` Dan Nicolaescu
2008-01-02 23:24     ` David Kastrup
2008-01-04  5:27     ` Richard Stallman
2008-01-04  6:10       ` Stefan Monnier
2008-01-05 14:29         ` Richard Stallman
2008-01-06  2:00           ` Stefan Monnier
2008-01-06 16:34             ` martin rudalics
2008-01-06 18:09             ` Richard Stallman

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200801021948.m02JmJ1Y005211@oogie-boogie.ics.uci.edu \
    --to=dann@ics.uci.edu \
    --cc=emacs-devel@gnu.org \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).