bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#23262: 25.0.90; Doc of `with-eval-after-load' and `eval-after-load'


From: Drew Adams
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)

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'





reply via email to

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