summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorChong Yidong <cyd@gnu.org>2012-03-10 12:00:13 +0800
committerChong Yidong <cyd@gnu.org>2012-03-10 12:00:13 +0800
commitbc44be50bac4fcd9d9c3a623964769607800bf36 (patch)
treedaea7b9f9703d3c6c1dd396a3c1fd0780481ac08 /doc
parent83ef8187f4841c160d3ef656149ed1ee14461867 (diff)
downloademacs-bc44be50bac4fcd9d9c3a623964769607800bf36.tar.gz
* loading.texi (Autoload): Explicitly state which forms are processed specially.
Fixes: debbugs:7783
Diffstat (limited to 'doc')
-rw-r--r--doc/lispref/ChangeLog3
-rw-r--r--doc/lispref/loading.texi33
2 files changed, 28 insertions, 8 deletions
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog
index 4a36d4939df..5823334f86a 100644
--- a/doc/lispref/ChangeLog
+++ b/doc/lispref/ChangeLog
@@ -1,5 +1,8 @@
2012-03-10 Chong Yidong <cyd@gnu.org>
+ * loading.texi (Autoload): Explicitly state which forms are
+ processed specially (Bug#7783).
+
* keymaps.texi (Mouse Menus): Describe non-toolkit behavior as the
non-default situation. Describe one-submenu exception (Bug#7695).
diff --git a/doc/lispref/loading.texi b/doc/lispref/loading.texi
index 3c2fa60248e..47a2a39ed63 100644
--- a/doc/lispref/loading.texi
+++ b/doc/lispref/loading.texi
@@ -500,14 +500,31 @@ Building Emacs loads @file{loaddefs.el} and thus calls @code{autoload}.
autoloads for all files in the current directory.
The same magic comment can copy any kind of form into
-@file{loaddefs.el}. If the form following the magic comment is not a
-function-defining form or a @code{defcustom} form, it is copied
-verbatim. ``Function-defining forms'' include @code{define-skeleton},
-@code{define-derived-mode}, @code{define-generic-mode} and
-@code{define-minor-mode} as well as @code{defun} and
-@code{defmacro}. To save space, a @code{defcustom} form is converted to
-a @code{defvar} in @file{loaddefs.el}, with some additional information
-if it uses @code{:require}.
+@file{loaddefs.el}. The form following the magic comment is copied
+verbatim, @emph{except} if it is one of the forms which the autoload
+facility handles specially (e.g.@: by conversion into an
+@code{autoload} call). The forms which are not copied verbatim are
+the following:
+
+@table @asis
+@item Definitions for function or function-like objects:
+@code{defun} and @code{defmacro}; also @code{defun*} and
+@code{defmacro*} (@pxref{Argument Lists,,,cl,CL Manual}), and
+@code{define-overloadable-function} (see the commentary in
+@file{mode-local.el}).
+
+@item Definitions for major or minor modes:
+@code{define-derived-mode}, @code{define-minor-mode},
+@code{define-compilation-mode}, @code{define-generic-mode},
+@code{easy-mmode-define-global-mode}, @code{define-global-minor-mode},
+@code{define-globalized-minor-mode}, and
+@code{easy-mmode-define-minor-mode}.
+
+@item Other definition types:
+@code{defcustom}, @code{defgroup}, @code{defclass}
+(@pxref{Top,EIEIO,,eieio,EIEIO}), and @code{define-skeleton} (see the
+commentary in @file{skeleton.el}).
+@end table
You can also use a magic comment to execute a form at build time
@emph{without} executing it when the file itself is loaded. To do this,