From: Vicente Vera <vicentemvp@gmail.com>
To: Noam Postavsky <npostavs@gmail.com>
Cc: Emacs developers <emacs-devel@gnu.org>
Subject: Re: emacs-26: `with-eval-after-load' docstring omission
Date: Sat, 24 Feb 2018 14:42:27 +0000 [thread overview]
Message-ID: <CAMfbzvDc9gdxiDwtvGBw2w=oghRU5hcAkScgf1akdzMHUj1vRA@mail.gmail.com> (raw)
In-Reply-To: <CAM-tV--2hDKLYimb7P85Ta604FzdE6WG4ZDLKEZyUvAsSVO-EQ@mail.gmail.com>
I think is relevant because their behavior is not
identical. Nevertheless, it is proposed just for the sake of clarity.
One might asume, because of similar syntax, that BODY in
‘with-eval-after-load’ will be passed to ‘eval’ just like in
‘eval-after-load’:
(eval-after-load 'asdf
(setq asdf-something nil))
;; (setq asdf-something nil) will be passed to ‘eval’
(with-eval-after-load 'asdf
(setq asdf-something nil))
;; This will be the same as:
;;
;; (eval-after-load 'asdf
;; (lambda () (setq asdf-something nil)))
;;
;; which will be passed to ‘funcall’ and not evaled.
And also, because of their name, which says ‘eval’, one might think
that BODY in ‘with-eval-after-load’ will be run through ‘eval’.
Unless by convention the ‘with-’ prefix is meant to express that BODY
will be treated as a function?
2018-02-23 14:16 GMT+00:00 Noam Postavsky <npostavs@gmail.com>:
> On Fri, Feb 23, 2018 at 8:42 AM, Vicente Vera <vicentemvp@gmail.com> wrote:
>
>> Currently, ‘with-eval-after-load’ docstring doesn't mention that BODY
>> is executed as a lambda expression through funcall. The docstrings
>> refers to ‘eval-after-load’ regarding the FILE argument, but not how
>> BODY is executed.
>
> Isn't that an irrelevant implementation detail? I don't see why it
> should be documented.
next prev parent reply other threads:[~2018-02-24 14:42 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-23 13:42 emacs-26: `with-eval-after-load' docstring omission Vicente Vera
2018-02-23 14:16 ` Noam Postavsky
2018-02-24 14:42 ` Vicente Vera [this message]
2018-02-27 20:40 ` Clément Pit-Claudel
2018-02-27 20:58 ` Stefan Monnier
2018-02-28 14:53 ` Clément Pit-Claudel
2018-02-28 23:22 ` Stefan Monnier
2018-03-17 6:01 ` Clément Pit-Claudel
2018-03-17 14:19 ` Stefan Monnier
2018-04-13 16:00 ` Clément Pit-Claudel
2018-04-13 18:02 ` Stefan Monnier
2018-04-13 18:28 ` Clément Pit-Claudel
2018-04-13 18:41 ` Stefan Monnier
2018-04-13 22:43 ` Stefan Monnier
2018-02-27 20:21 ` Stefan Monnier
2018-03-03 15:06 ` Vicente Vera
2018-03-03 15:38 ` Clément Pit-Claudel
2018-03-03 21:52 ` Stefan Monnier
2018-03-04 16:04 ` Vicente Vera
2018-03-05 3:39 ` Stefan Monnier
2018-03-09 1:00 ` Noam Postavsky
2018-03-09 4:55 ` Stefan Monnier
2018-03-09 0:47 ` Vicente Vera
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='CAMfbzvDc9gdxiDwtvGBw2w=oghRU5hcAkScgf1akdzMHUj1vRA@mail.gmail.com' \
--to=vicentemvp@gmail.com \
--cc=emacs-devel@gnu.org \
--cc=npostavs@gmail.com \
/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).