[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: no gnus registry new dependency on ert?
From: |
Ted Zlatanov |
Subject: |
Re: no gnus registry new dependency on ert? |
Date: |
Wed, 06 Apr 2011 09:26:55 -0500 |
User-agent: |
Gnus/5.110016 (No Gnus v0.16) Emacs/24.0.50 (gnu/linux) |
On Wed, 06 Apr 2011 15:28:07 +0200 David Engster <address@hidden> wrote:
DE> It seems like putting (require 'ert) into an eval-when-compile is not
DE> sufficient. You have to require it unconditionally.
DE> So maybe your first idea was The Right Thing To Do, meaning to use
DE> (require 'ert nil t)
DE> and then test for feature 'ert. Alternatively, you could use the current
DE> hack and put this require in there, too. But this is getting
DE> increasingly ugly...
See the attached patch, which just adds (require 'ert nil t) *in
addition* to the defmacro hack. It seems to DTRT for me, let me know
what you think.
Ted
diff --git a/lisp/gnus-registry.el b/lisp/gnus-registry.el
index 511012d..6c660b1 100644
--- a/lisp/gnus-registry.el
+++ b/lisp/gnus-registry.el
@@ -61,6 +61,7 @@
(when (null (require 'ert nil t))
(defmacro* ert-deftest (name () &body docstring-keys-and-body))))
+(require 'ert nil t)
(require 'gnus)
(require 'gnus-int)
(require 'gnus-sum)
diff --git a/lisp/registry.el b/lisp/registry.el
index cc03b20..edaa4f5 100644
--- a/lisp/registry.el
+++ b/lisp/registry.el
@@ -81,6 +81,8 @@
(when (null (require 'ert nil t))
(defmacro* ert-deftest (name () &body docstring-keys-and-body))))
+(require 'ert nil t)
+
(eval-when-compile (require 'cl))
(eval-and-compile
(or (ignore-errors (progn