[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: emacs-26: `with-eval-after-load' docstring omission
From: |
Vicente Vera |
Subject: |
Re: emacs-26: `with-eval-after-load' docstring omission |
Date: |
Sat, 24 Feb 2018 14:42:27 +0000 |
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 <address@hidden>:
> On Fri, Feb 23, 2018 at 8:42 AM, Vicente Vera <address@hidden> 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.
Re: emacs-26: `with-eval-after-load' docstring omission, Stefan Monnier, 2018/02/27