emacs-devel
[Top][All Lists]
Advanced

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

Re: cedet-bzr build failure (was : Lexical binding)


From: David Engster
Subject: Re: cedet-bzr build failure (was : Lexical binding)
Date: Sat, 02 Apr 2011 14:40:31 +0200
User-agent: Gnus/5.110014 (No Gnus v0.14) Emacs/24.0.50 (gnu/linux)

Darren Hoo writes:
> David Engster <address@hidden> writes:
>
>>> fail to build cedet-bzr after this merge
>>>
>>> Debugger entered--Lisp error: 
>>> (wrong-type-argument listp "Forgot to expand macro eieio-object-p")
>>
>> Inside the cedet-bzr directory, try 'make clean-all' and compile again.
>>
> hmm, so there are changes in eieio.el in this merge, after I steal the
> changes and applied to cedet-bzr, eieio.el now builds successfully, 
>
> But then I got another error:
>
> In toplevel form:
> semantic-grammar-wy.el:169:12:Error: Wrong type argument: listp, "Forgot
> to expand macro backquote-list*"

Yes, you're right. There was also a change to wisent-comp.el
(revno. 100595.1.31; you'll have to use "bzr log -n0" to see it).

I attached the patch with the changes for eieio.el and wisent-comp.el to
this mail. Eric, do you see a problem with committing those? I also
tested compilation with Emacs versions 23 and 22, and it seems to work
fine.

-David

=== modified file 'eieio/eieio.el'
--- eieio/eieio.el      2011-01-27 20:42:06 +0000
+++ eieio/eieio.el      2011-04-02 12:29:01 +0000
@@ -1207,7 +1207,7 @@
   (let ((byte-compile-free-references nil)
        (byte-compile-warnings nil)
        )
-    (byte-compile-lambda
+    (byte-compile
      `(lambda (&rest local-args)
        ,doc-string
        ;; This is a cool cheat.  Usually we need to look up in the

=== modified file 'semantic/wisent/wisent-comp.el'
--- semantic/wisent/wisent-comp.el      2010-04-09 02:08:59 +0000
+++ semantic/wisent/wisent-comp.el      2011-04-02 12:32:40 +0000
@@ -3500,9 +3500,19 @@
   ;; automaton internal data structure.  Then, because the internal
   ;; data structure contains an obarray, convert it to a lisp form so
   ;; it can be byte-compiled.
-  (byte-compile-form (wisent-automaton-lisp-form (eval form))))
+  (byte-compile-form
+   ;; FIXME: we macroexpand here since `byte-compile-form' expects
+   ;; macroexpanded code, but that's just a workaround: for lexical-binding
+   ;; the lisp form should have to pass through closure-conversion and
+   ;; `wisent-byte-compile-grammar' is called much too late for that.
+   ;; Why isn't this `wisent-automaton-lisp-form' performed at
+   ;; macroexpansion time?  --Stef
+   (macroexpand-all
+    (wisent-automaton-lisp-form (eval form)))))
 
-;;;###autoload
+;; FIXME: We shouldn't use a `byte-compile' handler.  Maybe using a hash-table
+;; instead of an obarray would work around the problem that obarrays
+;; aren't printable.  Then (put 'wisent-compile-grammar 'side-effect-free t).
 (put 'wisent-compile-grammar 'byte-compile 'wisent-byte-compile-grammar)
 
 (defun wisent-automaton-lisp-form (automaton)


reply via email to

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