aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman2005-02-14 10:16:24 +0000
committerRichard M. Stallman2005-02-14 10:16:24 +0000
commit9e328e231a6f97b580de43102bf1730e4c4b9cbf (patch)
tree22a2309952343289fd69fc8ccddd3460999e81a4
parent23e69ab14b523136d671c22da8ca8ba16bef89e9 (diff)
downloademacs-9e328e231a6f97b580de43102bf1730e4c4b9cbf.tar.gz
emacs-9e328e231a6f97b580de43102bf1730e4c4b9cbf.zip
(Autoload): defun's doc string overrides autoload's doc string.
(Repeated Loading): Modernize "add to list" examples. (Where Defined): Finish updating table of load-history elts.
-rw-r--r--lispref/loading.texi32
1 files changed, 18 insertions, 14 deletions
diff --git a/lispref/loading.texi b/lispref/loading.texi
index 61c5b13ca6f..ecd08868495 100644
--- a/lispref/loading.texi
+++ b/lispref/loading.texi
@@ -365,10 +365,12 @@ one of these suffixes, and it will not load from a file whose name is
365just @var{filename} with no added suffix. 365just @var{filename} with no added suffix.
366 366
367The argument @var{docstring} is the documentation string for the 367The argument @var{docstring} is the documentation string for the
368function. Normally, this should be identical to the documentation string 368function. Specifying the documentation string in the call to
369in the function definition itself. Specifying the documentation string 369@code{autoload} makes it possible to look at the documentation without
370in the call to @code{autoload} makes it possible to look at the 370loading the function's real definition. Normally, this should be
371documentation without loading the function's real definition. 371identical to the documentation string in the function definition
372itself. If it isn't, the function definition's documentation string
373takes effect when it is loaded.
372 374
373If @var{interactive} is non-@code{nil}, that says @var{function} can be 375If @var{interactive} is non-@code{nil}, that says @var{function} can be
374called interactively. This lets completion in @kbd{M-x} work without 376called interactively. This lets completion in @kbd{M-x} work without
@@ -526,8 +528,7 @@ initialized. (@xref{Defining Variables}.)
526 The simplest way to add an element to an alist is like this: 528 The simplest way to add an element to an alist is like this:
527 529
528@example 530@example
529(setq minor-mode-alist 531(push '(leif-mode " Leif") minor-mode-alist)
530 (cons '(leif-mode " Leif") minor-mode-alist))
531@end example 532@end example
532 533
533@noindent 534@noindent
@@ -536,12 +537,15 @@ To avoid the problem, write this:
536 537
537@example 538@example
538(or (assq 'leif-mode minor-mode-alist) 539(or (assq 'leif-mode minor-mode-alist)
539 (setq minor-mode-alist 540 (push '(leif-mode " Leif") minor-mode-alist))
540 (cons '(leif-mode " Leif") minor-mode-alist)))
541@end example 541@end example
542 542
543 To add an element to a list just once, you can also use @code{add-to-list} 543@noindent
544(@pxref{Setting Variables}). 544or this:
545
546@example
547(add-to-list '(leif-mode " Leif") minor-mode-alist)
548@end example
545 549
546 Occasionally you will want to test explicitly whether a library has 550 Occasionally you will want to test explicitly whether a library has
547already been loaded. Here's one way to test, in a library, whether it 551already been loaded. Here's one way to test, in a library, whether it
@@ -746,12 +750,12 @@ elements have these forms:
746@item @var{var} 750@item @var{var}
747The symbol @var{var} was defined as a variable. 751The symbol @var{var} was defined as a variable.
748@item (defun . @var{fun}) 752@item (defun . @var{fun})
749The @var{fun} was defined by this library. 753The function @var{fun} was defined.
750@item (t . @var{fun}) 754@item (t . @var{fun})
751The function @var{fun} was previously an autoload before this library 755The function @var{fun} was previously an autoload before this library
752redefined it as a function. The following element is always the 756redefined it as a function. The following element is always
753symbol @var{fun}, which signifies that the library defined @var{fun} 757@code{(defun . @var{fun}), which represents defining @var{fun} as a
754as a function. 758function.
755@item (autoload . @var{fun}) 759@item (autoload . @var{fun})
756The function @var{fun} was defined as an autoload. 760The function @var{fun} was defined as an autoload.
757@item (require . @var{feature}) 761@item (require . @var{feature})