diff options
| author | Richard M. Stallman | 1995-03-03 06:49:59 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1995-03-03 06:49:59 +0000 |
| commit | d2e9ee068c6cb19161c23da451011adadcd222cb (patch) | |
| tree | 1751168fee93ae3bf43127b6dc0a3a385203d7d4 | |
| parent | 4d9bd664230622448a43b8960264b8419f17b157 (diff) | |
| download | emacs-d2e9ee068c6cb19161c23da451011adadcd222cb.tar.gz emacs-d2e9ee068c6cb19161c23da451011adadcd222cb.zip | |
Change in eval-after-load; advise not using it.
| -rw-r--r-- | lispref/loading.texi | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/lispref/loading.texi b/lispref/loading.texi index 01b648d0026..8254107e710 100644 --- a/lispref/loading.texi +++ b/lispref/loading.texi | |||
| @@ -583,7 +583,8 @@ loaded, by calling @code{eval-after-load}. | |||
| 583 | 583 | ||
| 584 | @defun eval-after-load library form | 584 | @defun eval-after-load library form |
| 585 | This function arranges to evaluate @var{form} at the end of loading the | 585 | This function arranges to evaluate @var{form} at the end of loading the |
| 586 | library @var{library}, if and when @var{library} is loaded. | 586 | library @var{library}, if and when @var{library} is loaded. If |
| 587 | @var{library} is already loaded, it evaluates @var{form} right away. | ||
| 587 | 588 | ||
| 588 | The library name @var{library} must exactly match the argument of | 589 | The library name @var{library} must exactly match the argument of |
| 589 | @code{load}. To get the proper results when an installed library is | 590 | @code{load}. To get the proper results when an installed library is |
| @@ -594,6 +595,18 @@ An error in @var{form} does not undo the load, but does prevent | |||
| 594 | execution of the rest of @var{form}. | 595 | execution of the rest of @var{form}. |
| 595 | @end defun | 596 | @end defun |
| 596 | 597 | ||
| 598 | In general, well-designed Lisp programs should not use this feature. | ||
| 599 | The clean and modular ways to interact with a Lisp library are (1) | ||
| 600 | examine and set the library's variables (those which are meant for | ||
| 601 | outside use), and and (2) call the library's functions. If you wish to | ||
| 602 | do (1), you can do it immediately---there is no need to wait for when | ||
| 603 | the library is loaded. To do (2), you must load the library (preferably | ||
| 604 | with @code{require}). | ||
| 605 | |||
| 606 | But it is to use @code{eval-after-load} in your personal customizations | ||
| 607 | if you don't feel they must meet the design standards of programs to be | ||
| 608 | released. | ||
| 609 | |||
| 597 | @defvar after-load-alist | 610 | @defvar after-load-alist |
| 598 | An alist of expressions to evaluate if and when particular libraries are | 611 | An alist of expressions to evaluate if and when particular libraries are |
| 599 | loaded. Each element looks like this: | 612 | loaded. Each element looks like this: |