[Top][All Lists]

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

Re: emacs-26: `with-eval-after-load' docstring omission

From: Clément Pit-Claudel
Subject: Re: emacs-26: `with-eval-after-load' docstring omission
Date: Fri, 13 Apr 2018 14:28:57 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0

On 2018-04-13 14:02, Stefan Monnier wrote:
> But in the case of flycheck-define-command at least, I don't see much
> benefit to having it be a macro instead of some inert data in
> a variable.

Except that form (flycheck-define-checker) defines a variable, too, right? That 
is, it expands to a defvar and a function call.

The concrete issue stems from users copying a form from flycheck.el intto their 
init file, without macro-expanding it.  Of course, we can recommend that users 
copy the macro-expanded version (the defvar + the function call) — but that's 
not ideal, because not many of our users know how to do that (macroexpand a 
form).  And macroexpanding all uses in flycheck.el isn't an option either.

> I'd be perfectly happy to add a new macro like
>     (defmacro with-lazy-macro-expansion (&rest body)
>       `(eval '(progn ,@body) lexical-binding))
> but I'm reluctant to add a macro that's specific to eval-after-load
> since the problem is more general.

That would be nice.  It would then be safe to do




reply via email to

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