[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: |
Stefan Monnier |
Subject: |
Re: [Emacs-diffs] trunk r113822: Add a test for decompressing gzipped data |
Date: |
Tue, 13 Aug 2013 10:41:54 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) |
> The 2 fboundp tests return non-nil when Emacs was built with zlib
> support. zlib-available-p can return nil on MS-Windows, when the zlib
> shared library is not available, even though Emacs was built with zlib
> support. On platforms other than Windows, the fboundp tests and
> testing the return value of zlib-available-p are equivalent.
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 I guess we can't have that because we also want to lazy-load the
zlib shared library, right?
Stefan
- Re: [Emacs-diffs] trunk r113822: Add a test for decompressing gzipped data, Stefan Monnier, 2013/08/12
- Re: [Emacs-diffs] trunk r113822: Add a test for decompressing gzipped data,
Stefan Monnier <=
- Re: [Emacs-diffs] trunk r113822: Add a test for decompressing gzipped data, Eli Zaretskii, 2013/08/13
- Re: [Emacs-diffs] trunk r113822: Add a test for decompressing gzipped data, Lars Magne Ingebrigtsen, 2013/08/13
- Re: [Emacs-diffs] trunk r113822: Add a test for decompressing gzipped data, Stefan Monnier, 2013/08/13
- Re: [Emacs-diffs] trunk r113822: Add a test for decompressing gzipped data, Eli Zaretskii, 2013/08/13
- Re: [Emacs-diffs] trunk r113822: Add a test for decompressing gzipped data, Stefan Monnier, 2013/08/13