emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: no gnus registry new dependency on ert?


From: David Engster
Subject: Re: no gnus registry new dependency on ert?
Date: Wed, 06 Apr 2011 15:28:07 +0200
User-agent: Gnus/5.110016 (No Gnus v0.16) Emacs/24.0.50 (darwin)

Ted Zlatanov writes:
> On Wed, 06 Apr 2011 05:54:46 -0500 Ted Zlatanov <address@hidden> wrote: 
>
> TZ> On Wed, 06 Apr 2011 12:10:26 +0200 David Engster <address@hidden> wrote: 
> DE> Either that, or just do
>
> DE> (eval-when-compile
> DE> (when (null (require 'ert nil t))
> DE> (defmacro* ert-deftest (name () &body docstring-keys-and-body))))
>
> DE> to silence the byte-compiler. Your solution is less hacky, but then you
> DE> have to always remember to wrap ert-deftest in those featurep clauses.
>
> TZ> Oh, I like your solution better since I don't have to reindent ;)
>
> TZ> I made the change in *registry.el, thanks.
>
> Interesting.  When I byte-compile in Gnus (just "make" in the Lisp
> directory), I get the attached backtrace.  Sorry for the nasty backtrace
> but I can't load the code AND exhibit the problem.
>
> If I load gnus-registry.el and do `M-x eval-buffer' then it works
> properly.  So something is off with the byte-compilation, at least the
> compilation that Gnus does.

It seems like putting (require 'ert) into an eval-when-compile is not
sufficient. You have to require it unconditionally.

So maybe your first idea was The Right Thing To Do, meaning to use

(require 'ert nil t)

and then test for feature 'ert. Alternatively, you could use the current
hack and put this require in there, too. But this is getting
increasingly ugly...

-David



reply via email to

[Prev in Thread] Current Thread [Next in Thread]