[Top][All Lists]

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

Re: [External] : Re: About the usage of `with-eval-after-load'.

From: Hongyi Zhao
Subject: Re: [External] : Re: About the usage of `with-eval-after-load'.
Date: Sun, 19 Sep 2021 11:41:39 +0800

On Sat, Sep 18, 2021 at 10:56 PM Drew Adams <> wrote:
> > > Based on the above explanation, it seems that only one FILE can be
> > > used, but according to my tries, the following code snippet also take
> > > effect:
> > >   (add-hook 'python-mode-hook 'hs-minor-mode)
> > >   (with-eval-after-load
> > >     "python"
> > >     (progn...) 'elpy (pyvenv-activate...))
> Joost explained well what's going on.  In addition,
> just in case it still isn't clear:
> You're using only _one_ FILE arg, "python".  The 3
> other args you pass correspond to the &rest arg (aka
> &body defmacro arg), BODY.  So BODY is the list of
> actual args: ((progn...) 'elpy (pyenv-activate...)).
> Before macro `with-eval-after-load' was added, users
> sometimes forgot to quote (or otherwise generate) the
> second arg to the _function_ `eval-after-load' (and it
> is a single arg, FORM, not an &rest list of args BODY).
> That was the main reason `with-*' was introduced: for
> convenience because 99% of the time FORM was a quoted
> sexp, and sometimes users forgot the quote char.

Thank you for your thoughtful further explanation, which makes me feel
that the Emacs community is indeed one of the few places in the world
where dedicated experts and masters gather. Even though my LISP
language level is still fairly rudimentary, I still have the
motivation to improve with the help of many mentors in such an

BTW, why do you write the title for your post like the following:

RE: [External] :

Best, HZ

reply via email to

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