aboutsummaryrefslogtreecommitdiffstats
path: root/src/lread.c
diff options
context:
space:
mode:
authorStefan Monnier2013-06-13 18:24:52 -0400
committerStefan Monnier2013-06-13 18:24:52 -0400
commitde0503df97a507a523a192e877a8d5c7439c4846 (patch)
tree0753a678f85a7ea1a2eb46b81067e8a5d6dfc1e0 /src/lread.c
parentbc5c8c5a6a1956122284468879862b1850dc3b5d (diff)
downloademacs-de0503df97a507a523a192e877a8d5c7439c4846.tar.gz
emacs-de0503df97a507a523a192e877a8d5c7439c4846.zip
* lisp/subr.el (with-eval-after-load): New macro.
(eval-after-load): Allow form to be a function. take advantage of lexical-binding. (do-after-load-evaluation): Use dolist and adjust to new format. * lisp/simple.el (bad-packages-alist): Use dolist and with-eval-after-load. * doc/lispref/loading.texi (Hooks for Loading): Document with-eval-after-load instead of eval-after-load. Don't document after-load-alist. * src/lread.c (syms_of_lread): * src/fns.c (Fprovide): Adjust to new format of after-load-alist.
Diffstat (limited to 'src/lread.c')
-rw-r--r--src/lread.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lread.c b/src/lread.c
index 3ca644bb45b..b57665e365c 100644
--- a/src/lread.c
+++ b/src/lread.c
@@ -4485,15 +4485,15 @@ customize `jka-compr-load-suffixes' rather than the present variable. */);
4485 DEFSYM (Qload_in_progress, "load-in-progress"); 4485 DEFSYM (Qload_in_progress, "load-in-progress");
4486 4486
4487 DEFVAR_LISP ("after-load-alist", Vafter_load_alist, 4487 DEFVAR_LISP ("after-load-alist", Vafter_load_alist,
4488 doc: /* An alist of expressions to be evalled when particular files are loaded. 4488 doc: /* An alist of functions to be evalled when particular files are loaded.
4489Each element looks like (REGEXP-OR-FEATURE FORMS...). 4489Each element looks like (REGEXP-OR-FEATURE FUNCS...).
4490 4490
4491REGEXP-OR-FEATURE is either a regular expression to match file names, or 4491REGEXP-OR-FEATURE is either a regular expression to match file names, or
4492a symbol \(a feature name). 4492a symbol \(a feature name).
4493 4493
4494When `load' is run and the file-name argument matches an element's 4494When `load' is run and the file-name argument matches an element's
4495REGEXP-OR-FEATURE, or when `provide' is run and provides the symbol 4495REGEXP-OR-FEATURE, or when `provide' is run and provides the symbol
4496REGEXP-OR-FEATURE, the FORMS in the element are executed. 4496REGEXP-OR-FEATURE, the FUNCS in the element are called.
4497 4497
4498An error in FORMS does not undo the load, but does prevent execution of 4498An error in FORMS does not undo the load, but does prevent execution of
4499the rest of the FORMS. */); 4499the rest of the FORMS. */);