summaryrefslogtreecommitdiff
path: root/doc/lispref/loading.texi
diff options
context:
space:
mode:
authorChong Yidong <cyd@gnu.org>2012-10-30 08:29:37 +0800
committerChong Yidong <cyd@gnu.org>2012-10-30 08:29:37 +0800
commite29e39c9c6aee68a50fef5149cc3acdfa74fec72 (patch)
treec88836ed25faf44771754698c5508fcffb2b96d7 /doc/lispref/loading.texi
parentfc83c2de544c15ce8e4e8fc7c6dd68cc4956a457 (diff)
downloademacs-e29e39c9c6aee68a50fef5149cc3acdfa74fec72.tar.gz
Document more Emacs 24.3 changes.
* frames.texi (Visibility of Frames): Document tty-top-frame. * loading.texi (Autoload): Document autoloadp, autoload-do-load. * symbols.texi (Symbol Plists): Document function-get.
Diffstat (limited to 'doc/lispref/loading.texi')
-rw-r--r--doc/lispref/loading.texi38
1 files changed, 31 insertions, 7 deletions
diff --git a/doc/lispref/loading.texi b/doc/lispref/loading.texi
index 77a31cfde7a..6a18bea2977 100644
--- a/doc/lispref/loading.texi
+++ b/doc/lispref/loading.texi
@@ -408,9 +408,9 @@ to load automatically from @var{filename}. The string @var{filename}
specifies the file to load to get the real definition of @var{function}.
If @var{filename} does not contain either a directory name, or the
-suffix @code{.el} or @code{.elc}, then @code{autoload} insists on adding
-one of these suffixes, and it will not load from a file whose name is
-just @var{filename} with no added suffix. (The variable
+suffix @code{.el} or @code{.elc}, this function insists on adding one
+of these suffixes, and it will not load from a file whose name is just
+@var{filename} with no added suffix. (The variable
@code{load-suffixes} specifies the exact required suffixes.)
The argument @var{docstring} is the documentation string for the
@@ -442,10 +442,11 @@ and calls @code{define-key}; not even if the variable name is the same
symbol @var{function}.
@cindex function cell in autoload
-If @var{function} already has a non-void function definition that is not
-an autoload object, @code{autoload} does nothing and returns @code{nil}.
-If the function cell of @var{function} is void, or is already an autoload
-object, then it is defined as an autoload object like this:
+if @var{function} already has non-void function definition that is not
+an autoload object, this function does nothing and returns @code{nil}.
+Otherwise, it constructs an autoload object (@pxref{Autoload Type}),
+and stores it as the function definition for @var{function}. The
+autoload object has this form:
@example
(autoload @var{filename} @var{docstring} @var{interactive} @var{type})
@@ -468,6 +469,16 @@ refers to the documentation string in the
not a macro or a keymap.
@end defun
+@defun autoloadp object
+This function returns non-@code{nil} if @var{object} is an autoload
+object. For example, to check if @code{run-prolog} is defined as an
+autoloaded function, evaluate
+
+@smallexample
+(autoloadp (symbol-function 'run-prolog))
+@end smallexample
+@end defun
+
@cindex autoload errors
The autoloaded file usually contains other definitions and may require
or provide one or more features. If the file is not completely loaded
@@ -599,6 +610,19 @@ override that, e.g., in the ``Local Variables'' section of a
assumed to contain a trailer starting with a formfeed character.
@end defvar
+ The following function may be used to explicitly load the library
+specified by an autoload object:
+
+@defun autoload-do-load autoload &optional name macro-only
+This function performs the loading specified by @var{autoload}, which
+whould be an autoload object. The optional argument @var{name}, if
+non-@code{nil}, should be a symbol whose function value is
+@var{autoload}; in that case, the return value of this function is the
+symbol's new function value. If the value of the optional argument
+@var{macro-only} is @code{macro}, this function avoids loading a
+function, only a macro.
+@end defun
+
@node Repeated Loading
@section Repeated Loading
@cindex repeated loading