David Engster writes: > Ted Zlatanov writes: >> On Fri, 01 Apr 2011 15:29:38 -0500 Ted Zlatanov 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. > > 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: [...] I tested a little bit more. I created a short test case which I attached to this mail. Run it by doing emacs --batch -L . -l bc-test -f bc-test If everything works, you should get Method with mapcar: (("20" "foo 20") ("30" "foo 30") ("40" "foo 40")) Method with loop: (("20" "foo 20") ("30" "foo 30") ("40" "foo 40")) Here's what I observe: * The 'mapcar' method always works. * If you don't byte-compile, the 'loop' method will also work. * If you byte-compile, the 'loop' method will fail with Emacs24 *before* the lexbind merge. After the lexbind merge, it works as expected. Note that the :initform evaluation will not work with the EIEIO version which ships with Emacs23. I remember some discussions regarding this issue; it's probably best to use an explicit constructor. I included it in the test case (you have to uncomment it). When using the class w/ constructor, you can also compile it under Emacs23, and the 'loop' method will then also fail. The funny thing is that Emacs24 *after* the lexbind merge cannot run that byte-compiled code from Emacs23; is that to be expected? -David