emacs-devel
[Top][All Lists]
Advanced

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

Re: bizarre byte-compile issue, possibly due to EIEIO


From: David Engster
Subject: Re: bizarre byte-compile issue, possibly due to EIEIO
Date: Sat, 02 Apr 2011 23:32:45 +0200
User-agent: Gnus/5.110016 (No Gnus v0.16) Emacs/24.0.50 (gnu/linux)

Ted Zlatanov writes:
> On Fri, 01 Apr 2011 15:29:38 -0500 Ted Zlatanov <address@hidden> wrote: 
>
> TZ> In other words, the registry.elc file is breaking the tests.  I can't
> TZ> figure out what's wrong, but it seems EIEIO-related.  If I try to
> TZ> edebug, that evaluates the problematic methods (e.g. `registry-lookup')
> TZ> and then they don't exhibit the problem.
>
> TZ> Using "(eval-when-compile (require 'registry))" instead of 
> TZ> "(require 'registry)" doesn't help.  All the registry.el ERT tests pass.
>
> (CC to ding mailing list; see prior messages on emacs-devel for context)
>
> I've been able to work around it with:
>
> (let ((load-suffixes '(".el")))
>   (require 'registry))

[...]

> So I hope someone can help me out :)

I can't really explain anything, but maybe I can at least shift the
blame. ;-)

If I rewrite your registry-lookup function to use 'mapcar' instead of
'loop', the tests work as expected:

(defmethod registry-lookup ((db registry-db) keys)
  "Search for KEYS in the registry-db THIS.
Returns a alist of the key followed by the entry in a list, not a cons cell."
  (let ((data (oref db :data)))
    (delq nil
          (mapcar
           (lambda (k)
             (when (gethash k data)
               (list k (gethash k data))))
           keys))))

-David



reply via email to

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