[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Byte compiling questions
From: |
Bill Wohler |
Subject: |
Re: Byte compiling questions |
Date: |
02 Dec 2001 23:26:02 -0800 |
User-agent: |
Gnus/5.0808 (Gnus v5.8.8) Emacs/21.1 |
Stefan,
Thanks for the feedback.
"Stefan Monnier" <monnier+gnu/address@hidden> writes:
> In that case I recommend another approach: don't use `require' but put
>
> (autoload 'gnus-article-highlight-citation "gnus-cite")
>
> somewhere at the top of your file instead. [ Actually, it recently
> occurred to me that we could provide a `lazy-require' which the
> byte-compiler would recognize and turn into a series of autoloads. ]
Neat.
> > ** reference to free variable mh-scan-subject-regexp
>
> Is it a (defvar mh-scan-subject-regexp <val>) or a
> (defvar mh-scan-subject-regexp) ?
> If the latter, it's no wonder because when the byte-compiler loads
> mh-e.el the (defvar mh-scan-subject-regexp) will have no effect
> (it only has effect when the byte-compiler actually byte-compiles
> this defvar, so it has to be in the same file).
The former! So why am I still getting the warning?
> > Finally, and this is why this was posted to emacs-devel instead of
> > gnu.emacs.help, is the code expected to byte-compile clean before
> > being checked into Emacs?
>
> It's better if it does, but loads of packages don't.
> And it's better to keep the code clean than the compilation's
> output clean, so it's only worth it to cleanup warnings if it
> doesn't make the code ugly.
I wouldn't classify the autoloads as ugly, would you?
--
Bill Wohler <address@hidden> http://www.newt.com/wohler/ GnuPG ID:610BD9AD
Maintainer of comp.mail.mh FAQ and mh-e. Vote Libertarian!
If you're passed on the right, you're in the wrong lane.