emacs-devel
[Top][All Lists]
Advanced

[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 12:00:41 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0

On 2018-03-17 10:19, Stefan Monnier wrote:
> As mentioned before: cleaner semantics.  Macro-expanding the body of
> with-eval-after-load more lazily (which is the core of the problem
> you're hitting) won't help you if you happened to write your code as:
> 
>     (defun my-after-flycheck ()
>       (push "npx" (flycheck-checker-get 'javascript-eslint 'command)))
>     (with-eval-after-load 'flycheck
>       (my-after-flycheck))

Right.  That function should be moved into the with-eval-after-load block :)

> I'd suggest to start by trying to find a way to get the behavior you
> want *without* relying on (with-)eval-after-load (which is fiddly in any
> case for all kinds of reasons.  It's a handy tool when you need it, but
> if you need it I consider that it's usually a sign that there's
> a problem elsewhere).
> Of course, this may require changes in flycheck.

Sorry for the long delay.  I spend some time thinking about this, but I didn't 
reach a satisfactory conclusion.

Flycheck defines a few of macros.  Our users want to write code that depends on 
them in their init files, but don't care for that code to run unless they are 
in fact using Flycheck.

What's the right approach?
Couldn't we just define a with-macroexpand-and-eval-after-load macro, and call 
it a day?

Clément.



reply via email to

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