[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Does not byte-compile return the compiled function in Emacs 24?
From: |
Stefan Monnier |
Subject: |
Re: Does not byte-compile return the compiled function in Emacs 24? |
Date: |
Thu, 08 Dec 2011 09:56:27 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.91 (gnu/linux) |
>> Don't know. `byte-compile' does various things in various circumstances
>> (it's pretty DWIMish), so without more details I can't help you.
> What about this?
> (byte-compile (defun foo ())) => #[...]
This is really:
(defun foo ())
(byte-compile 'foo)
> (byte-compile (lambda () nil)) => #[...]
This happens to be the same as
(byte-compile '(lambda () nil))
which is the preferred form to call it.
> (setq lexical-binding t)
> (byte-compile (defun foo ())) => nil
Indeed, this is not supported currently: (symbol-function 'foo) is
a closure rather than a lambda expression, and byte-compile doesn't know
how to compile a closure.
> (byte-compile (lambda () nil)) => nil
This fails because you're passing it a closure rather than
a lambda-expression (i.e. same problem as for `defun' above).
This works: (byte-compile '(lambda () nil))
Stefan
- Re: Does not byte-compile return the compiled function in Emacs 24?, (continued)
Re: Does not byte-compile return the compiled function in Emacs 24?, Stefan Monnier, 2011/12/06
- Re: Does not byte-compile return the compiled function in Emacs 24?, Lennart Borgman, 2011/12/06
- Re: Does not byte-compile return the compiled function in Emacs 24?, Andreas Schwab, 2011/12/07
- Re: Does not byte-compile return the compiled function in Emacs 24?, Stefan Monnier, 2011/12/07
- Re: Does not byte-compile return the compiled function in Emacs 24?, Lennart Borgman, 2011/12/07
- Re: Does not byte-compile return the compiled function in Emacs 24?, Lennart Borgman, 2011/12/08
- Re: Does not byte-compile return the compiled function in Emacs 24?, Stefan Monnier, 2011/12/08
Re: Does not byte-compile return the compiled function in Emacs 24?, Johan Bockgård, 2011/12/07
- Re: Does not byte-compile return the compiled function in Emacs 24?,
Stefan Monnier <=