From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: [Emacs-diffs] trunk r113822: Add a test for decompressing gzipped data Date: Tue, 13 Aug 2013 10:41:54 -0400 Message-ID: References: <83iozapan0.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1376404936 23190 80.91.229.3 (13 Aug 2013 14:42:16 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 13 Aug 2013 14:42:16 +0000 (UTC) Cc: larsi@gnus.org, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Aug 13 16:42:18 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 1V9Fnb-0007Eg-LK for ged-emacs-devel@m.gmane.org; Tue, 13 Aug 2013 16:42:15 +0200 Original-Received: from localhost ([::1]:56495 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V9Fnb-000285-A9 for ged-emacs-devel@m.gmane.org; Tue, 13 Aug 2013 10:42:15 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51088) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V9FnP-000257-1X for emacs-devel@gnu.org; Tue, 13 Aug 2013 10:42:11 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V9FnG-0008D8-Hj for emacs-devel@gnu.org; Tue, 13 Aug 2013 10:42:02 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:32922) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V9FnG-0008D2-EX for emacs-devel@gnu.org; Tue, 13 Aug 2013 10:41:54 -0400 Original-Received: from [98.143.210.201] (port=52726 helo=ceviche.home) by fencepost.gnu.org with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1V9FnE-00077P-Kv; Tue, 13 Aug 2013 10:41:53 -0400 Original-Received: by ceviche.home (Postfix, from userid 20848) id E5B1B663DD; Tue, 13 Aug 2013 10:41:54 -0400 (EDT) In-Reply-To: <83iozapan0.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 13 Aug 2013 05:50:11 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::e 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:162657 Archived-At: > 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