[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: `eval-when-compile' can cause incorrect byte-compiler warnings
From: |
Jesper Harder |
Subject: |
Re: `eval-when-compile' can cause incorrect byte-compiler warnings |
Date: |
Fri, 23 Jan 2004 07:34:22 +0100 |
User-agent: |
Gnus/5.110002 (No Gnus v0.2) Emacs/21.3.50 (gnu/linux) |
Richard Stallman <address@hidden> writes:
> I don't think it is correct to discard the byte-compile-noruntime
> properties after each compilation. What makes it correct not to
> warn about them for file2 is the fact that file2 contains (require
> 'nnkiboze) outside of eval-when-compile. But if you recompile file1
> after file2, ideally you would want to get the warnings again.
True. But that doesn't happen today, so it wouldn't make it worse to
nix out the properties in this particular case. It would remove
legitimate warnings in other cases, though.
> It may not be worth the trouble to change this at all if it still
> won't be "correct".
Yeah. You can, of course, always byte compile the files individually
if you want more correct warnings.
> ***************
> *** 1173,1179 ****
> ;; Check to see if the function will be available at runtime
> ;; and/or remember its arity if it's unknown.
> (or (and (or sig (fboundp (car form))) ; might be a subr or autoload.
> ! (not (get (car form) 'byte-compile-noruntime)))
> (eq (car form) byte-compile-current-form) ; ## this doesn't work
> ; with recursion.
> ;; It's a currently-undefined function.
> --- 1178,1184 ----
> ;; Check to see if the function will be available at runtime
> ;; and/or remember its arity if it's unknown.
> (or (and (or sig (fboundp (car form))) ; might be a subr or autoload.
> ! (memq (car form) byte-compile-noruntime-functions))
This should be:
(not (memq (car form) byte-compile-noruntime-functions)))