[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: address@hidden: RE: weirddefadvicebugwithbyte-compilation]
From: |
Eli Zaretskii |
Subject: |
Re: address@hidden: RE: weirddefadvicebugwithbyte-compilation] |
Date: |
Tue, 13 Dec 2005 06:30:54 +0200 |
> From: "Drew Adams" <address@hidden>
> Date: Mon, 12 Dec 2005 13:53:31 -0800
>
> > This makes me wonder now if byte-compiling in defadvice (i.e.
> > on the fly)
> > should display a *Compile Log* buffer at all. I don't know.
>
> Why not? It's a byte compilation like any other one, and these
> warnings do serve a purpose: your code, as posted, had a bug.
>
> Where is the bug? The byte-compiler warning presumably arose because it
> compiled a defadvice that referred to variable my-mode. That variable is not
> bound in the defadvice body and it might not be bound at the point in the
> file when the defadvice is compiled. Is that a bug?
Well, it might be. (I thought you actually said elsewhere in this
thread that it was a bug, and that you deliberately kept it in the
code to reproduce the crash.) The warning alerts you to look into
this.
> Should people systematically place defadvice last in a file or do
> (provide 'x)(require 'x) just to make sure that all variables in a
> defadvice body are defined before it is compiled?
If you want the byte compiler help you find such typos, then yes, you
should try to eliminate gratuitous warnings, to keep the noise level
low enough for you to see the real warnings.
> I also don't understand, as I mentioned, _why_ the defadvice in foo.el is
> byte-compiled - it has no `compile' keyword.
I thought this was how defadvice worked, but I might be wrong. In any
case, the fact that the byte compiler is run is clear from the
backtrace.
- RE: address@hidden:RE:weirddefadvicebugwithbyte-compilation], (continued)
- Re: address@hidden: RE: weird defadvice bug with byte-compilation], Eli Zaretskii, 2005/12/11
- RE: address@hidden: RE: weird defadvice bug withbyte-compilation], Drew Adams, 2005/12/11
- Re: address@hidden: RE: weird defadvice bug withbyte-compilation], Eli Zaretskii, 2005/12/12
- RE: address@hidden: RE: weird defadvice bugwithbyte-compilation], Drew Adams, 2005/12/12
- RE: address@hidden: RE: weird defadvicebugwithbyte-compilation], Drew Adams, 2005/12/12
- Re: address@hidden: RE: weird defadvicebugwithbyte-compilation], Eli Zaretskii, 2005/12/12
- RE: address@hidden: RE: weirddefadvicebugwithbyte-compilation], Drew Adams, 2005/12/12
- Re: address@hidden: RE: weirddefadvicebugwithbyte-compilation],
Eli Zaretskii <=
- RE: address@hidden: RE:weirddefadvicebugwithbyte-compilation], Drew Adams, 2005/12/13
- Re: address@hidden: RE: weird defadvice bug with byte-compilation], Richard M. Stallman, 2005/12/12
- Re: address@hidden: RE: weird defadvice bug with byte-compilation], Eli Zaretskii, 2005/12/12
- Re: address@hidden: RE: weird defadvice bug with byte-compilation], Richard M. Stallman, 2005/12/12
- Re: address@hidden: RE: weird defadvice bug with byte-compilation], Eli Zaretskii, 2005/12/12
- Re: address@hidden: RE: weird defadvice bug with byte-compilation], Richard M. Stallman, 2005/12/13
- Re: address@hidden: RE: weird defadvice bug with byte-compilation], Eli Zaretskii, 2005/12/14
- Re: address@hidden: RE: weird defadvice bug with byte-compilation], Richard M. Stallman, 2005/12/14
- Re: address@hidden: RE: weird defadvice bug with byte-compilation], Eli Zaretskii, 2005/12/14
- Re: address@hidden: RE: weird defadvice bug with byte-compilation], Richard M. Stallman, 2005/12/15