Subject: 23.4; does not byte-compile several packages with `Eager macro-expansion failure: (wrong-type-argument sequencep 769)' (due to lexical binding?)

From: Gregor Zattler <[email-masked]>
Date: Mon, 12 Aug 2013 08:17:34 +0200

Installing emacs-snapshot results in error messages 
`Eager macro-expansion failure: (wrong-type-argument sequencep 769)'
while pre-compiling debian add-on packages like `apel' (see
attachment).  Since the errors occour with several packages I
assume a bug in emacs.

The problematic invocation is
emacs  -q -no-site-file -batch -l __myinit.el -f batch-byte-compile alist.el apel-ver.el atype.el broken.el calist.el emu.el file-detect.el filename.el install.el inv-19.el inv-23.el invisible.el mcharset.el mcs-20.el mcs-e20.el mule-caesar.el path-util.el pccl-20.el pccl.el pces-20.el pces-e20.el pces.el pcustom.el poe.el poem-e20_3.el poem-e20.el poem.el product.el pym.el richtext.el static.el tinycustom.el

with __myinit.el being:

#+BEGIN_SRC emacs-lisp 
(setq load-path (cons "." load-path))
(setq byte-compile-warnings nil)
#+END_SRC

It is possible to install emacs-snapshot as of
2013-07-24 but not as of 2013-08-04 or as of 2013-08-10.
Therefore I bisected the recent commit history.  First "bad"
commit is:

commit 65ca9602f8bb761180ef8589db6bfce6f55251f7
Refs: HEAD, refs/bisect/bad
Author:     Stefan Monnier <[email-masked]>
AuthorDate: Thu Aug 1 19:18:37 2013 -0400
Commit:     Stefan Monnier <[email-masked]>
CommitDate: Thu Aug 1 19:18:37 2013 -0400

    * lisp/files.el: Use lexical-binding.
    (dir-locals-read-from-file): Remove unused `err' variable.
    (hack-dir-local-variables--warned-coding): New var.
    (hack-dir-local-variables): Use it to avoid repeated warnings.
    (make-backup-file-name--default-function): New function.
    (make-backup-file-name-function): Use it as default.
    (buffer-stale--default-function): New function.
    (buffer-stale-function): Use it as default.
    (revert-buffer-insert-file-contents--default-function): New function.
    (revert-buffer-insert-file-contents-function): Use it as default.
    (insert-directory): Avoid add-to-list.
    * lisp/autorevert.el (auto-revert-handler): Simplify.
    Use buffer-stale--default-function.
---
 lisp/ChangeLog     |   17 +++++
 lisp/autorevert.el |   12 ++--
 lisp/files.el      |  204 +++++++++++++++++++++++++++-------------------------
 3 files changed, 130 insertions(+), 103 deletions(-)

Since I don't understand elisp I'm lost here.

Thanks for your attention, Gregor