diff options
| author | Philipp Stephani | 2019-12-26 11:08:56 +0100 |
|---|---|---|
| committer | Philipp Stephani | 2019-12-26 11:08:56 +0100 |
| commit | e1ce9f34239f0c0d1940223d135797d98f65672d (patch) | |
| tree | 1d107cd47aa24591a4a9ca8074fdf4bd6801e98a /doc | |
| parent | 03f962a4863c986adbfc2787ea77c2e76056ed52 (diff) | |
| download | emacs-e1ce9f34239f0c0d1940223d135797d98f65672d.tar.gz emacs-e1ce9f34239f0c0d1940223d135797d98f65672d.zip | |
Don't recommend using 'module-load' for loading modules.
'module-load' most likely doesn't do what users expect. Users should
use 'load' and its wrappers, which do the right thing.
* doc/lispref/loading.texi (Dynamic Modules): Document
disadvantages of 'module-load' and recommend normal 'load' and
its wrappers instead.
* doc/lispref/internals.texi (Module Functions): Recommend
'load' over 'module-load'.
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/lispref/internals.texi | 4 | ||||
| -rw-r--r-- | doc/lispref/loading.texi | 6 |
2 files changed, 8 insertions, 2 deletions
diff --git a/doc/lispref/internals.texi b/doc/lispref/internals.texi index bccdca65e4e..c7b9e7286b3 100644 --- a/doc/lispref/internals.texi +++ b/doc/lispref/internals.texi | |||
| @@ -1423,8 +1423,8 @@ following simple Lisp wrapper: | |||
| 1423 | @end lisp | 1423 | @end lisp |
| 1424 | 1424 | ||
| 1425 | The Lisp package which goes with your module could then load the | 1425 | The Lisp package which goes with your module could then load the |
| 1426 | module using the @code{module-load} primitive (@pxref{Dynamic | 1426 | module using the @code{load} primitive (@pxref{Dynamic Modules}) when |
| 1427 | Modules}) when the package is loaded into Emacs. | 1427 | the package is loaded into Emacs. |
| 1428 | 1428 | ||
| 1429 | @node Module Values | 1429 | @node Module Values |
| 1430 | @subsection Conversion Between Lisp and Module Values | 1430 | @subsection Conversion Between Lisp and Module Values |
diff --git a/doc/lispref/loading.texi b/doc/lispref/loading.texi index 3261e6d1888..3ba5fea4ca6 100644 --- a/doc/lispref/loading.texi +++ b/doc/lispref/loading.texi | |||
| @@ -1217,6 +1217,12 @@ during the initialization. If the initialization succeeds, | |||
| 1217 | @code{module-load} returns @code{t}. Note that @var{file} must | 1217 | @code{module-load} returns @code{t}. Note that @var{file} must |
| 1218 | already have the proper file-name extension, as this function doesn't | 1218 | already have the proper file-name extension, as this function doesn't |
| 1219 | try looking for files with known extensions, unlike @code{load}. | 1219 | try looking for files with known extensions, unlike @code{load}. |
| 1220 | |||
| 1221 | Unlike @code{load}, @code{module-load} doesn't record the module in | ||
| 1222 | @code{load-history}, doesn't print any messages, and doesn't protect | ||
| 1223 | against recursive loads. Most users should therefore use @code{load}, | ||
| 1224 | @code{load-file}, @code{load-library}, or @code{require} instead of | ||
| 1225 | @code{module-load}. | ||
| 1220 | @end defun | 1226 | @end defun |
| 1221 | 1227 | ||
| 1222 | Loadable modules in Emacs are enabled by using the | 1228 | Loadable modules in Emacs are enabled by using the |