mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-09 15:50:40 -08:00
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'.
This commit is contained in:
parent
03f962a486
commit
e1ce9f3423
2 changed files with 8 additions and 2 deletions
|
|
@ -1423,8 +1423,8 @@ following simple Lisp wrapper:
|
||||||
@end lisp
|
@end lisp
|
||||||
|
|
||||||
The Lisp package which goes with your module could then load the
|
The Lisp package which goes with your module could then load the
|
||||||
module using the @code{module-load} primitive (@pxref{Dynamic
|
module using the @code{load} primitive (@pxref{Dynamic Modules}) when
|
||||||
Modules}) when the package is loaded into Emacs.
|
the package is loaded into Emacs.
|
||||||
|
|
||||||
@node Module Values
|
@node Module Values
|
||||||
@subsection Conversion Between Lisp and Module Values
|
@subsection Conversion Between Lisp and Module Values
|
||||||
|
|
|
||||||
|
|
@ -1217,6 +1217,12 @@ during the initialization. If the initialization succeeds,
|
||||||
@code{module-load} returns @code{t}. Note that @var{file} must
|
@code{module-load} returns @code{t}. Note that @var{file} must
|
||||||
already have the proper file-name extension, as this function doesn't
|
already have the proper file-name extension, as this function doesn't
|
||||||
try looking for files with known extensions, unlike @code{load}.
|
try looking for files with known extensions, unlike @code{load}.
|
||||||
|
|
||||||
|
Unlike @code{load}, @code{module-load} doesn't record the module in
|
||||||
|
@code{load-history}, doesn't print any messages, and doesn't protect
|
||||||
|
against recursive loads. Most users should therefore use @code{load},
|
||||||
|
@code{load-file}, @code{load-library}, or @code{require} instead of
|
||||||
|
@code{module-load}.
|
||||||
@end defun
|
@end defun
|
||||||
|
|
||||||
Loadable modules in Emacs are enabled by using the
|
Loadable modules in Emacs are enabled by using the
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue