[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: strange byte compiler behavior
From: |
Dan Nicolaescu |
Subject: |
Re: strange byte compiler behavior |
Date: |
Wed, 02 Jan 2008 11:48:18 -0800 |
Dan Nicolaescu <address@hidden> 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...)
- Re: strange byte compiler behavior, martin rudalics, 2008/01/01
- Re: strange byte compiler behavior,
Dan Nicolaescu <=
- Re: strange byte compiler behavior, martin rudalics, 2008/01/02
- Re: strange byte compiler behavior, Dan Nicolaescu, 2008/01/02
- Re: strange byte compiler behavior, David Kastrup, 2008/01/02
- Re: strange byte compiler behavior, Richard Stallman, 2008/01/04
- Re: strange byte compiler behavior, Stefan Monnier, 2008/01/04
- Re: strange byte compiler behavior, Richard Stallman, 2008/01/05
- Re: strange byte compiler behavior, Stefan Monnier, 2008/01/05
- Re: strange byte compiler behavior, martin rudalics, 2008/01/06
- Re: strange byte compiler behavior, Richard Stallman, 2008/01/06