aboutsummaryrefslogtreecommitdiffstats
path: root/lispref/loading.texi
diff options
context:
space:
mode:
authorKaroly Lorentey <[email protected]>2007-02-24 19:26:54 +0000
committerKaroly Lorentey <[email protected]>2007-02-24 19:26:54 +0000
commitf65f7603312547e51230192daf34349b8ac569a0 (patch)
treecbc5877854d00bbdd5ecd4906d130ab8fbb44430 /lispref/loading.texi
parent9440b75fccbf763e3fb23a31a128d97eb4debdf5 (diff)
parent735895f1fa28f88c559e73910ea0ff0bda0f228c (diff)
Merged from [email protected]
Patches applied: * [email protected]/emacs--devo--0--patch-619 Update from CVS * [email protected]/emacs--devo--0--patch-620 Update from CVS * [email protected]/emacs--devo--0--patch-621 Merge from gnus--rel--5.10 * [email protected]/emacs--devo--0--patch-622 Update from CVS * [email protected]/emacs--devo--0--patch-623 Remove RCS keywords * [email protected]/emacs--devo--0--patch-624 Update from CVS * [email protected]/emacs--devo--0--patch-625 Update from CVS * [email protected]/emacs--devo--0--patch-626 Update from CVS * [email protected]/emacs--devo--0--patch-627 Update from CVS * [email protected]/emacs--devo--0--patch-628 Update from CVS * [email protected]/emacs--devo--0--patch-629 Merge from gnus--rel--5.10 * [email protected]/emacs--devo--0--patch-630 Update from CVS * [email protected]/emacs--devo--0--patch-631 Update from CVS * [email protected]/emacs--devo--0--patch-632 Update from CVS * [email protected]/emacs--devo--0--patch-633 Update from CVS * [email protected]/emacs--devo--0--patch-634 Update from CVS * [email protected]/emacs--devo--0--patch-635 Update from CVS * [email protected]/emacs--devo--0--patch-636 Update from CVS * [email protected]/emacs--devo--0--patch-637 Remove RCS keywords * [email protected]/emacs--devo--0--patch-638 Update from CVS * [email protected]/emacs--devo--0--patch-639 Update from CVS * [email protected]/emacs--devo--0--patch-640 Update from CVS * [email protected]/emacs--devo--0--patch-641 Update from CVS * [email protected]/emacs--devo--0--patch-642 Merge from gnus--rel--5.10 * [email protected]/emacs--devo--0--patch-643 Update from CVS * [email protected]/emacs--devo--0--patch-644 Update from CVS * [email protected]/emacs--devo--0--patch-645 Update from CVS * [email protected]/emacs--devo--0--patch-646 Update from CVS * [email protected]/emacs--devo--0--patch-647 Update from CVS * [email protected]/emacs--devo--0--patch-648 Update from CVS * [email protected]/emacs--devo--0--patch-649 Update from CVS * [email protected]/gnus--rel--5.10--patch-197 Merge from emacs--devo--0 * [email protected]/gnus--rel--5.10--patch-198 Update from CVS * [email protected]/gnus--rel--5.10--patch-199 Update from CVS * [email protected]/gnus--rel--5.10--patch-200 Merge from emacs--devo--0 * [email protected]/gnus--rel--5.10--patch-201 Update from CVS: lisp/nnweb.el (nnweb-google-parse-1): Update parser. * [email protected]/gnus--rel--5.10--patch-202 Update from CVS git-archimport-id: [email protected]/emacs--multi-tty--0--patch-596
Diffstat (limited to 'lispref/loading.texi')
-rw-r--r--lispref/loading.texi42
1 files changed, 29 insertions, 13 deletions
diff --git a/lispref/loading.texi b/lispref/loading.texi
index 004989ad38..3d294b2cc2 100644
--- a/lispref/loading.texi
+++ b/lispref/loading.texi
@@ -903,14 +903,29 @@ You can ask for code to be executed if and when a particular library is
loaded, by calling @code{eval-after-load}.
@defun eval-after-load library form
-This function arranges to evaluate @var{form} at the end of loading the
-library @var{library}, if and when @var{library} is loaded. If
+This function arranges to evaluate @var{form} at the end of loading
+the file @var{library}, each time @var{library} is loaded. If
@var{library} is already loaded, it evaluates @var{form} right away.
+Don't forget to quote @var{form}!
-If @var{library} is a string, it must exactly match the argument of
-@code{load} used to load the library. To get the proper results when an
-installed library is found by searching @code{load-path}, you should not
-include any directory names in @var{library}.
+You don't need to give a directory or extension in the file name
+@var{library}---normally you just give a bare file name, like this:
+
+@example
+(eval-after-load "edebug" '(def-edebug-spec c-point t))
+@end example
+
+To restrict which files can trigger the evaluation, include a
+directory or an extension or both in @var{library}. Only a file whose
+absolute true name (i.e., the name with all symbolic links chased out)
+matches all the given name components will match. In the following
+example, @file{my_inst.elc} or @file{my_inst.elc.gz} in some directory
+@code{..../foo/bar} will trigger the evaluation, but not
+@file{my_inst.el}:
+
+@example
+(eval-after-load "foo/bar/my_inst.elc" @dots{})
+@end example
@var{library} can also be a feature (i.e.@: a symbol), in which case
@var{form} is evaluated when @code{(provide @var{library})} is called.
@@ -932,19 +947,20 @@ customizations if you don't feel they must meet the design standards for
programs meant for wider use.
@defvar after-load-alist
-This variable holds an alist of expressions to evaluate if and when
-particular libraries are loaded. Each element looks like this:
+This variable, an alist built by @code{eval-after-load}, holds the
+expressions to evaluate when particular libraries are loaded. Each
+element looks like this:
@example
-(@var{filename} @var{forms}@dots{})
+(@var{regexp-or-feature} @var{forms}@dots{})
@end example
-The function @code{load} checks @code{after-load-alist} in order to
-implement @code{eval-after-load}.
+The key @var{regexp-or-feature} is either a regular expression or a
+symbol, and the value is a list of forms. The forms are evaluated when
+the key matches the the absolute true name of the file being
+@code{load}ed or the symbol being @code{provide}d.
@end defvar
-@c Emacs 19 feature
-
@ignore
arch-tag: df731f89-0900-4389-a436-9105241b6f7a
@end ignore