aboutsummaryrefslogtreecommitdiffstats
path: root/src/fns.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/fns.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/fns.c')
-rw-r--r--src/fns.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/fns.c b/src/fns.c
index 08c6f055f38..06d4e358f10 100644
--- a/src/fns.c
+++ b/src/fns.c
@@ -2545,6 +2545,8 @@ SUBFEATURE can be used to check a specific subfeature of FEATURE. */)
2545 return (NILP (tem)) ? Qnil : Qt; 2545 return (NILP (tem)) ? Qnil : Qt;
2546} 2546}
2547 2547
2548static Lisp_Object Qfuncall;
2549
2548DEFUN ("provide", Fprovide, Sprovide, 1, 2, 0, 2550DEFUN ("provide", Fprovide, Sprovide, 1, 2, 0,
2549 doc: /* Announce that FEATURE is a feature of the current Emacs. 2551 doc: /* Announce that FEATURE is a feature of the current Emacs.
2550The optional argument SUBFEATURES should be a list of symbols listing 2552The optional argument SUBFEATURES should be a list of symbols listing
@@ -2567,7 +2569,7 @@ particular subfeatures supported in this version of FEATURE. */)
2567 /* Run any load-hooks for this file. */ 2569 /* Run any load-hooks for this file. */
2568 tem = Fassq (feature, Vafter_load_alist); 2570 tem = Fassq (feature, Vafter_load_alist);
2569 if (CONSP (tem)) 2571 if (CONSP (tem))
2570 Fprogn (XCDR (tem)); 2572 Fmapc (Qfuncall, XCDR (tem));
2571 2573
2572 return feature; 2574 return feature;
2573} 2575}
@@ -4866,6 +4868,7 @@ syms_of_fns (void)
4866Used by `featurep' and `require', and altered by `provide'. */); 4868Used by `featurep' and `require', and altered by `provide'. */);
4867 Vfeatures = Fcons (intern_c_string ("emacs"), Qnil); 4869 Vfeatures = Fcons (intern_c_string ("emacs"), Qnil);
4868 DEFSYM (Qsubfeatures, "subfeatures"); 4870 DEFSYM (Qsubfeatures, "subfeatures");
4871 DEFSYM (Qfuncall, "funcall");
4869 4872
4870#ifdef HAVE_LANGINFO_CODESET 4873#ifdef HAVE_LANGINFO_CODESET
4871 DEFSYM (Qcodeset, "codeset"); 4874 DEFSYM (Qcodeset, "codeset");