Gnus development mailing list
 help / color / mirror / Atom feed
From: kgreiner@xpediantsolutions.com
Subject: Re: Two questions about byte compilation
Date: Mon, 13 Jan 2003 10:21:35 -0600	[thread overview]
Message-ID: <u1y3hggvk.fsf@xpediantsolutions.com> (raw)
In-Reply-To: <87k7h9ftsn.fsf@mulligatwani.msrl.com>

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



  reply	other threads:[~2003-01-13 16:21 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-01-12 22:27 Michael Shields
2003-01-12 22:54 ` Lars Magne Ingebrigtsen
2003-01-13  6:27   ` Michael Shields
2003-01-13 16:21     ` kgreiner [this message]
2003-01-13 18:29     ` Lars Magne Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=u1y3hggvk.fsf@xpediantsolutions.com \
    --to=kgreiner@xpediantsolutions.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).