emacs-devel
[Top][All Lists]
Advanced

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

Re: A combination of defmacro, functionp, and quoted lambdas yields diff


From: Clément Pit-Claudel
Subject: Re: A combination of defmacro, functionp, and quoted lambdas yields different results on consecutive evaluations
Date: Mon, 26 Feb 2018 12:01:50 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0

On 2018-02-26 11:31, Stefan Monnier wrote:
>> Why is that relevant here, given that I'm *not* compiling the file?

> If the semantics depends on interpretation-vs-compilation, then you're
> on your own.  Macroexpansion happens "some time" between the moment the
> machine leans that a given sexp is to be interpreted as code and the
> moment that code is executed.

Stefan, I think we're miscommunicating.  Sorry if I'm being unclear or 
unhelpful.  I'm trying to understand what the proper fix is to a bug that was 
reported by a Flycheck user.  You're telling me that I "get what I deserved" 
and that I'm "on my own" :/

My user's problem is the following: Flycheck defines a macro that lets you 
define a new checker.  One of our users wrote something like this:

(with-eval-after-load 'flycheck
  (flycheck-define-checker
    …))

This doesn't work.  I claim that it should, or that it should be documented to 
not work.  Do you disagree?

>> (FWIW, I do indeed expect with-eval-after-load to protect its argument from
>> compilation, yes.
> Why?

Because of the documentation says that this macro arranges for evaluation to be 
delayed.  It's OK if the contents are compiled, but only if that doesn't change 
the semantics.  Otherwise, either the docs of with-eval-after-load are wrong, 
or with-eval-after-load has a bug, AFAICT.

Sorry if I'm missing something obvious.
Clément.



reply via email to

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