emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Emacs-diffs] trunk r113822: Add a test for decompressing gzipped da


From: Eli Zaretskii
Subject: Re: [Emacs-diffs] trunk r113822: Add a test for decompressing gzipped data
Date: Tue, 13 Aug 2013 19:25:00 +0300

> From: Stefan Monnier <address@hidden>
> Date: Tue, 13 Aug 2013 10:41:54 -0400
> Cc: address@hidden, address@hidden
> 
> Can't we get rid of zlib-available-p entirely.
> Just replace
> 
>    (if (and (fboundp 'zlib-available-p) (zlib-available-p))
>        (zlib-decompress-region ...)
>      blabla)
> 
> with
> 
>    (condition-case nil
>        (zlib-decompress-region ...)
>      ((void-function zlib-not-available)
>       blabla))
> 
> Hmm... but the above is not recognized by the byte-compiler either, so
> you'll still see the spurious warning :-(
> The best would really be
> 
>    (if (fboundp 'zlib-decompress-region)
>        (zlib-decompress-region ...)
>      blabla)

But you assume that whoever needs this test needs it only for calling
zlib-decompress-region.  What if there's some feature based on zlib
that entirely makes no sense if zlib is not available?  Trying to
decompress a file just to discover this sounds gross to me.

> but I guess we can't have that because we also want to lazy-load the
> zlib shared library, right?

As of revision 113823, zlib-decompress-region itself lazy-loads.  So
this problem no longer exists.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]