* Two questions about byte compilation
@ 2003-01-12 22:27 Michael Shields
2003-01-12 22:54 ` Lars Magne Ingebrigtsen
0 siblings, 1 reply; 5+ messages in thread
From: Michael Shields @ 2003-01-12 22:27 UTC (permalink / raw)
1. The skip-boring patch I've written tries to add to gnus.art:
(defcustom gnus-article-boring-faces (cons 'gnus-signature-face
gnus-cite-face-list)
[...]
This doesn't byte-compile properly, because gnus-cite-face-list is
undefined. However, I can't (require 'gnus-cite), because
gnus-cite.el has (require 'gnus-art) and the byte-compiler loops
until hitting the recursion limit.
What is the right way to fix this?
2. Why does dgnushack.el wrap an (ignore-errors) around the call to
byte-compile-file? This causes files with errors to silently fail
to compile; then after "make install" you have a mix of old and new
files, with no warning.
--
Shields.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Two questions about byte compilation
2003-01-12 22:27 Two questions about byte compilation Michael Shields
@ 2003-01-12 22:54 ` Lars Magne Ingebrigtsen
2003-01-13 6:27 ` Michael Shields
0 siblings, 1 reply; 5+ messages in thread
From: Lars Magne Ingebrigtsen @ 2003-01-12 22:54 UTC (permalink / raw)
Michael Shields <shields@msrl.com> writes:
> 1. The skip-boring patch I've written tries to add to gnus.art:
>
> (defcustom gnus-article-boring-faces (cons 'gnus-signature-face
> gnus-cite-face-list)
> [...]
>
> This doesn't byte-compile properly, because gnus-cite-face-list is
> undefined. However, I can't (require 'gnus-cite), because
> gnus-cite.el has (require 'gnus-art) and the byte-compiler loops
> until hitting the recursion limit.
>
> What is the right way to fix this?
Put the definition of `gnus-article-boring-faces' (and the functions
that depend on it) in gnus-cite.el.
> 2. Why does dgnushack.el wrap an (ignore-errors) around the call to
> byte-compile-file? This causes files with errors to silently fail
> to compile; then after "make install" you have a mix of old and new
> files, with no warning.
They don't fail silently, surely. They issue a warning, usually.
So the effect is basically that of "make -k".
--
(domestic pets only, the antidote for overdose, milk.)
larsi@gnus.org * Lars Magne Ingebrigtsen
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Two questions about byte compilation
2003-01-12 22:54 ` Lars Magne Ingebrigtsen
@ 2003-01-13 6:27 ` Michael Shields
2003-01-13 16:21 ` kgreiner
2003-01-13 18:29 ` Lars Magne Ingebrigtsen
0 siblings, 2 replies; 5+ messages in thread
From: Michael Shields @ 2003-01-13 6:27 UTC (permalink / raw)
In article <m33cnyyo6k.fsf@quimbies.gnus.org>,
Lars Magne Ingebrigtsen <larsi@gnus.org> wrote:
>> This doesn't byte-compile properly, because gnus-cite-face-list is
>> undefined. However, I can't (require 'gnus-cite), because
>> gnus-cite.el has (require 'gnus-art) and the byte-compiler loops
>> until hitting the recursion limit.
>>
>> What is the right way to fix this?
>
> Put the definition of `gnus-article-boring-faces' (and the functions
> that depend on it) in gnus-cite.el.
Hmmm... that would work, but it seems that then such things as
gnus-treat-hide-citation should also be in gnus-cite.el. Also,
boring-faces isn't just for citations.
I experimented some more and found that I could say:
(eval-when-compile
(unless (boundp 'gnus-cite-face-list)
(setq gnus-cite-face-list nil)))
(defcustom gnus-article-boring-faces (cons 'gnus-signature-face
gnus-cite-face-list)
[...]
Is that ugly or is it a good workaround?
>> 2. Why does dgnushack.el wrap an (ignore-errors) around the call to
>> byte-compile-file? This causes files with errors to silently fail
>> to compile; then after "make install" you have a mix of old and new
>> files, with no warning.
>
> They don't fail silently, surely. They issue a warning, usually.
Usually.
> So the effect is basically that of "make -k".
But why is this desirable? Shouldn't it abort when byte-compilation
fails?
--
Shields.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Two questions about byte compilation
2003-01-13 6:27 ` Michael Shields
@ 2003-01-13 16:21 ` kgreiner
2003-01-13 18:29 ` Lars Magne Ingebrigtsen
1 sibling, 0 replies; 5+ messages in thread
From: kgreiner @ 2003-01-13 16:21 UTC (permalink / raw)
Michael Shields <shields@msrl.com> writes:
> In article <m33cnyyo6k.fsf@quimbies.gnus.org>,
> Lars Magne Ingebrigtsen <larsi@gnus.org> wrote:
>>> This doesn't byte-compile properly, because gnus-cite-face-list is
>>> undefined. However, I can't (require 'gnus-cite), because
>>> gnus-cite.el has (require 'gnus-art) and the byte-compiler loops
>>> until hitting the recursion limit.
>>>
>>> What is the right way to fix this?
>>
>> Put the definition of `gnus-article-boring-faces' (and the functions
>> that depend on it) in gnus-cite.el.
>
> Hmmm... that would work, but it seems that then such things as
> gnus-treat-hide-citation should also be in gnus-cite.el. Also,
> boring-faces isn't just for citations.
>
> I experimented some more and found that I could say:
>
> (eval-when-compile
> (unless (boundp 'gnus-cite-face-list)
> (setq gnus-cite-face-list nil)))
> (defcustom gnus-article-boring-faces (cons 'gnus-signature-face
> gnus-cite-face-list)
> [...]
>
> Is that ugly or is it a good workaround?
Ugly. If you have to do this, use a defvar.
(eval-when-compile
(defvar gnus-cite-face-list))
>
>>> 2. Why does dgnushack.el wrap an (ignore-errors) around the call to
>>> byte-compile-file? This causes files with errors to silently fail
>>> to compile; then after "make install" you have a mix of old and new
>>> files, with no warning.
>>
>> They don't fail silently, surely. They issue a warning, usually.
>
> Usually.
>
>> So the effect is basically that of "make -k".
>
> But why is this desirable? Shouldn't it abort when byte-compilation
> fails?
Actually, byte-compile-file is supposed to return nil when the
compilation fails. The ignore-errors should be unnecessary but
probably protects against errors in the compiler itself.
If feature X contains a programming error, then every file requiring X
may fail to compile. With some compilation warnings, it may be very
difficult to identify the error in X when looking at one of the files
requiring X. To me, it seems safer to compile everything.
Kevin
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Two questions about byte compilation
2003-01-13 6:27 ` Michael Shields
2003-01-13 16:21 ` kgreiner
@ 2003-01-13 18:29 ` Lars Magne Ingebrigtsen
1 sibling, 0 replies; 5+ messages in thread
From: Lars Magne Ingebrigtsen @ 2003-01-13 18:29 UTC (permalink / raw)
Michael Shields <shields@msrl.com> writes:
> Hmmm... that would work, but it seems that then such things as
> gnus-treat-hide-citation should also be in gnus-cite.el. Also,
> boring-faces isn't just for citations.
But it depends strongly on gnus-cite, so it makes sense to put it
there.
> I experimented some more and found that I could say:
>
> (eval-when-compile
> (unless (boundp 'gnus-cite-face-list)
> (setq gnus-cite-face-list nil)))
> (defcustom gnus-article-boring-faces (cons 'gnus-signature-face
> gnus-cite-face-list)
> [...]
>
> Is that ugly or is it a good workaround?
I think that's too ugly. :-)
> But why is this desirable? Shouldn't it abort when byte-compilation
> fails?
I like getting all the error messages in one sweep.
--
(domestic pets only, the antidote for overdose, milk.)
larsi@gnus.org * Lars Magne Ingebrigtsen
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2003-01-13 18:29 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-01-12 22:27 Two questions about byte compilation Michael Shields
2003-01-12 22:54 ` Lars Magne Ingebrigtsen
2003-01-13 6:27 ` Michael Shields
2003-01-13 16:21 ` kgreiner
2003-01-13 18:29 ` Lars Magne Ingebrigtsen
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 NNTP newsgroup(s).