unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Clément Pit-Claudel" <cpitclaudel@gmail.com>
To: Stefan Monnier <monnier@IRO.UMontreal.CA>
Cc: emacs-devel@gnu.org
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	[thread overview]
Message-ID: <555f3f1b-d31f-ec12-e460-8b0c20816d45@gmail.com> (raw)
In-Reply-To: <jwvy3jf7m1t.fsf-monnier+emacs@gnu.org>

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.



  parent reply	other threads:[~2018-02-26 17:01 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-17 16:04 A combination of defmacro, functionp, and quoted lambdas yields different results on consecutive evaluations Clément Pit-Claudel
2018-02-17 21:58 ` Stefan Monnier
2018-02-18 15:17   ` Clément Pit-Claudel
2018-02-18 18:02     ` Stefan Monnier
2018-02-25 18:09       ` Clément Pit-Claudel
2018-02-26  3:18         ` Stefan Monnier
2018-02-26  5:40           ` Clément Pit-Claudel
2018-02-26 13:11             ` Stefan Monnier
2018-02-26 15:20               ` Clément Pit-Claudel
2018-02-26 16:31                 ` Stefan Monnier
2018-02-26 16:38                   ` Stefan Monnier
2018-02-26 17:08                     ` Clément Pit-Claudel
2018-02-26 17:31                       ` Stefan Monnier
2018-02-28 14:32                         ` Clément Pit-Claudel
2018-02-28 16:02                           ` Stefan Monnier
2018-02-26 17:01                   ` Clément Pit-Claudel [this message]
2018-02-26 17:13                     ` Stefan Monnier
2018-02-26 17:32                       ` Clément Pit-Claudel
2018-02-26 17:40                         ` Clément Pit-Claudel
2018-03-01  0:50                       ` Radon Rosborough
2018-02-27 21:35                     ` Stefan Monnier
2018-02-28 12:44                       ` Michael Heerdegen
2018-02-28 13:31                         ` Stefan Monnier
2018-02-28 14:26                       ` Clément Pit-Claudel
2018-02-28 23:12                         ` Stefan Monnier
2018-02-26 13:13             ` Stefan Monnier
2018-02-26 15:20               ` Clément Pit-Claudel
2018-02-26 16:33                 ` Stefan Monnier
2018-02-26 16:37         ` Michael Heerdegen
2018-02-26 17:15           ` Clément Pit-Claudel
2018-02-26 17:38             ` Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=555f3f1b-d31f-ec12-e460-8b0c20816d45@gmail.com \
    --to=cpitclaudel@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@IRO.UMontreal.CA \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).