From: Drew Adams <drew.adams@oracle.com>
To: 23262@debbugs.gnu.org
Subject: bug#23262: 25.0.90; Doc of `with-eval-after-load' and `eval-after-load'
Date: Sun, 10 Apr 2016 11:43:19 -0700 (PDT) [thread overview]
Message-ID: <257fe19a-0537-45f4-a085-4fe7f5600d91@default> (raw)
AFAICT, there was no great need for creating macro
`with-eval-after-load' (and essentially telling users to
prefer it over function `eval-after-load'). The "need"
seems to have been only the fact that some users were not
quoting arguments that they did not want to have
evaluated.
But having done that, whoever did it seems to have dropped
the ball wrt documenting it. At the least, its doc should
refer to `eval-after-load' (and vice versa presumably).
As for the changes that were made to the doc string of
`eval-after-load':
FORM can now be a function, and what it can be is
described before the description of what FILE can be.
These are out of order. (OK, not very important.)
As for the doc in the Elisp manual: `eval-after-load' is no
longer even mentioned, except for these nodes: (1) `Hooks for
Loading`, (2) `Coding Conventions', and (3) `Named Features'.
The doc should be cleaned up to be coherent. And (IMHO) it
_should_ document `eval-after-load' - far more important than
documenting `with-eval-after-load'. Mentioning the latter
does not replace describing the former.
1. Node `Hooks for Loading` says:
Normally, well-designed Lisp programs should not use
'eval-after-load'....
Perhaps it meant to say `with-eval-after-load' here?
If not, why not?
2. Node `Coding Conventions' says:
Avoid using 'eval-after-load' in libraries and packages
(*note Hooks for Loading::). This feature is meant for
personal customizations; using it in a Lisp program is
unclean...
Again, why only `eval-after-load' for such a caution, and
not (also) `with-eval-after-load'?
3. Node `Named Features' says:
The direct effect of calling 'provide' is if not already
in FEATURES then to add FEATURE to the front of that list
and call any 'eval-after-load' code waiting for it (*note
Hooks for Loading::).
Now clearly it is correct to speak of `eval-after-load'
here, and not `with-eval-after-load'. But is the same not
true pretty much everywhere? Ultimately, the _behavior_
is that of `eval-after-load' - `with-eval-after-load' is
only a wrapper.
Finally, the Emacs manual makes no reference to either the
macro or the function, except for this, in node `Foldout':
To use the Foldout package, you can type 'M-x load-library
<RET> foldout <RET>'; or you can arrange for to do that
automatically by putting the following in your init file:
(eval-after-load "outline" '(require 'foldout))
Is that mention appropriate, or should it be removed?
What's so special about library `foldout.el' in this regard?
In GNU Emacs 25.0.90.4 (i686-w64-mingw32)
of 2016-03-20
Windowing system distributor `Microsoft Corp.', version 6.1.7601
Configured using:
`configure --host=i686-w64-mingw32 --without-dbus
--without-compress-install CFLAGS=-static'
next reply other threads:[~2016-04-10 18:43 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-10 18:43 Drew Adams [this message]
2016-04-30 23:10 ` bug#23262: 25.0.90; Doc of `with-eval-after-load' and `eval-after-load' Lars Ingebrigtsen
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=257fe19a-0537-45f4-a085-4fe7f5600d91@default \
--to=drew.adams@oracle.com \
--cc=23262@debbugs.gnu.org \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.