[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: question about macro `minibuffer-with-setup-hook', byte-compilation
From: |
Drew Adams |
Subject: |
RE: question about macro `minibuffer-with-setup-hook', byte-compilation |
Date: |
Fri, 5 Oct 2012 13:33:16 -0700 |
> > Could you please explain what I am seeing, e.g., that the macro is
> > defined at runtime and the byte-code invokes it at runtime, but an
> > invalid function error is raised. Thx.
>
> The byte-compiler issued a warning like "function
> minibuffer-with-setup-hook is not known to be defined". In
> reality what it means is "minibuffer-with-setup-hook is not
> defined as a function nor as a macro, so I'll assume it's a
> function that will be suitably defined at run-time, since
> if it were a macro I'd need the macro's definition to
> be able to compile the code".
I understand that. I realize that the macro cannot be expanded into byte code
in this context. What I think I see in the byte code is, as you seem to
confirm, a runtime invocation of `minibuffer-with-setup-hook'.
What is not clear to me is why it is a problem in this context to expect the
macro to exist at runtime (since it does, as shown by `symbol-function').
Doesn't the (old-version) byte code simply tell the runtime invocation of the
command to look up the function definition of `minibuffer-with-setup-hook' and
use that? And if so, why wouldn't that cause the lookup to find that it is a
macro and DTRT (expand it at runtime).
I appreciate your explanation.
- question about macro `minibuffer-with-setup-hook', byte-compilation, Drew Adams, 2012/10/05
- Re: question about macro `minibuffer-with-setup-hook', byte-compilation, Stefan Monnier, 2012/10/05
- RE: question about macro `minibuffer-with-setup-hook', byte-compilation, Drew Adams, 2012/10/05
- Re: question about macro `minibuffer-with-setup-hook', byte-compilation, Stefan Monnier, 2012/10/05
- RE: question about macro `minibuffer-with-setup-hook', byte-compilation,
Drew Adams <=
- Re: question about macro `minibuffer-with-setup-hook', byte-compilation, Andreas Schwab, 2012/10/05
- RE: question about macro `minibuffer-with-setup-hook', byte-compilation, Drew Adams, 2012/10/05
question about macro `minibuffer-with-setup-hook', byte-compilation, Stephen J. Turnbull, 2012/10/06