From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: [Emacs-diffs] trunk r113822: Add a test for decompressing gzipped data Date: Tue, 13 Aug 2013 19:25:00 +0300 Message-ID: <83d2phpnhf.fsf@gnu.org> References: <83iozapan0.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1376411098 13028 80.91.229.3 (13 Aug 2013 16:24:58 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 13 Aug 2013 16:24:58 +0000 (UTC) Cc: larsi@gnus.org, emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Aug 13 18:24:59 2013 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1V9HP0-0001vl-Si for ged-emacs-devel@m.gmane.org; Tue, 13 Aug 2013 18:24:58 +0200 Original-Received: from localhost ([::1]:56692 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V9HP0-0004ob-F8 for ged-emacs-devel@m.gmane.org; Tue, 13 Aug 2013 12:24:58 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50693) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V9HOs-0004m5-5w for emacs-devel@gnu.org; Tue, 13 Aug 2013 12:24:55 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V9HOn-0006vJ-CD for emacs-devel@gnu.org; Tue, 13 Aug 2013 12:24:50 -0400 Original-Received: from mtaout22.012.net.il ([80.179.55.172]:33573) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V9HOn-0006v4-2f for emacs-devel@gnu.org; Tue, 13 Aug 2013 12:24:45 -0400 Original-Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0MRH00I00961GJ00@a-mtaout22.012.net.il> for emacs-devel@gnu.org; Tue, 13 Aug 2013 19:24:33 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MRH00IEZ9KX5OA0@a-mtaout22.012.net.il>; Tue, 13 Aug 2013 19:24:33 +0300 (IDT) In-reply-to: X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 X-Received-From: 80.179.55.172 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:162667 Archived-At: > From: Stefan Monnier > Date: Tue, 13 Aug 2013 10:41:54 -0400 > Cc: larsi@gnus.org, emacs-devel@gnu.org > > 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.