From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/78373 Path: news.gmane.org!not-for-mail From: David Engster Newsgroups: gmane.emacs.gnus.general Subject: Re: no gnus registry new dependency on ert? Date: Wed, 06 Apr 2011 12:10:26 +0200 Message-ID: References: <8762qs3swu.fsf@ericabrahamsen.net> <87ipur8zny.fsf@lifelogs.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1302084649 23478 80.91.229.12 (6 Apr 2011 10:10:49 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 6 Apr 2011 10:10:49 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M26677@lists.math.uh.edu Wed Apr 06 12:10:45 2011 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Q7PhE-0004kN-Ta for ding-account@gmane.org; Wed, 06 Apr 2011 12:10:45 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by util0.math.uh.edu with smtp (Exim 4.63) (envelope-from ) id 1Q7Ph7-0008Qi-3f; Wed, 06 Apr 2011 05:10:37 -0500 Original-Received: from mx2.math.uh.edu ([129.7.128.33]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1Q7Ph6-0008QY-2S for ding@lists.math.uh.edu; Wed, 06 Apr 2011 05:10:36 -0500 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx2.math.uh.edu with esmtp (Exim 4.72) (envelope-from ) id 1Q7Ph4-0006YM-SD for ding@lists.math.uh.edu; Wed, 06 Apr 2011 05:10:35 -0500 Original-Received: from v3-1008.vxen.de ([79.140.41.8]) by quimby.gnus.org with esmtp (Exim 4.72) (envelope-from ) id 1Q7Ph3-0002w8-Do for ding@gnus.org; Wed, 06 Apr 2011 12:10:33 +0200 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=randomsample.de; s=a; h=Content-Type:MIME-Version:Message-ID:Date:References:In-Reply-To:Subject:To:From; bh=qEo2mGWeUxMq286P883xorMx5+vqYhRc0TJDuIbgMR4=; b=mHg66CBQEWSrqvxttk88rmnegqgxW/LvQOR/IoLzIT4Q6LazwcoyLyAhx85i6iWIIwrrod7Ha/x4fAtNe+TeQjxyXftkF5UUr+c+n3M7OqR0J+hXyo2euCHpWJWb0vjn; Original-Received: from [134.76.4.230] (helo=imac.local) by v3-1008.vxen.de with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1Q7Ph1-0006ly-Ty for ding@gnus.org; Wed, 06 Apr 2011 12:10:31 +0200 In-Reply-To: <87ipur8zny.fsf@lifelogs.com> (Ted Zlatanov's message of "Wed, 06 Apr 2011 05:03:29 -0500") User-Agent: Gnus/5.110016 (No Gnus v0.16) Emacs/24.0.50 (darwin) Mail-Copies-To: never Mail-Followup-To: ding@gnus.org X-Spam-Score: -2.0 (--) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:78373 Archived-At: Ted Zlatanov writes: > On Wed, 06 Apr 2011 12:28:17 +0800 Eric Abrahamsen wrote: > > EA> The recent registry rewrite has introduced a dependency on the ERT > EA> testing library -- that library is part of emacs 24 but not emacs 23. > > Hmm, I'm actually not sure how to provide the ERT tests only if ERT is > available. Is there an example? It seems like: > > (require 'ert nil t) > ... > (when (featurep 'ert) > (ert-deftest gnus-registry-usage-test () > ... > ) > > should work but I want to be sure it will work properly. Either that, or just do (eval-when-compile (when (null (require 'ert nil t)) (defmacro* ert-deftest (name () &body docstring-keys-and-body)))) to silence the byte-compiler. Your solution is less hacky, but then you have to always remember to wrap ert-deftest in those featurep clauses. -David