aboutsummaryrefslogtreecommitdiffstats
path: root/src/eval.c
diff options
context:
space:
mode:
authorJim Blandy1992-11-07 07:00:37 +0000
committerJim Blandy1992-11-07 07:00:37 +0000
commitee9ee63cfadc62d9f31c119922deef92eca01164 (patch)
treedfff8d0ace4528851872df7a488c8d5592950f20 /src/eval.c
parent2381d133384a57886ae6509b4f2712cc706999d2 (diff)
downloademacs-ee9ee63cfadc62d9f31c119922deef92eca01164.tar.gz
emacs-ee9ee63cfadc62d9f31c119922deef92eca01164.zip
* eval.c (Fautoload): Renamed fifth argument TYPE. Document the
fact that (eq TYPE 'keymap) means FUNCTION will become a keymap when loaded. (Fmacroexpand): Instead of assuming that every autoload form with a fifth element is a macro, actually check the fifth element against t and `macro', which are the only values which denote macroness.
Diffstat (limited to 'src/eval.c')
-rw-r--r--src/eval.c25
1 files changed, 16 insertions, 9 deletions
diff --git a/src/eval.c b/src/eval.c
index 3974568329f..7726aadcb31 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -805,12 +805,16 @@ definitions to shadow the loaded ones for use in file byte-compilation.")
805 if (EQ (XCONS (def)->car, Qautoload)) 805 if (EQ (XCONS (def)->car, Qautoload))
806 { 806 {
807 /* Autoloading function: will it be a macro when loaded? */ 807 /* Autoloading function: will it be a macro when loaded? */
808 tem = Fcar (Fnthcdr (make_number (4), def)); 808 tem = Fnth (make_number (4), def);
809 if (NILP (tem)) 809 if (EQ (XCONS (tem)->car, Qt)
810 || EQ (XCONS (tem)->car, Qmacro))
811 /* Yes, load it and try again. */
812 {
813 do_autoload (def, sym);
814 continue;
815 }
816 else
810 break; 817 break;
811 /* Yes, load it and try again. */
812 do_autoload (def, sym);
813 continue;
814 } 818 }
815 else if (!EQ (XCONS (def)->car, Qmacro)) 819 else if (!EQ (XCONS (def)->car, Qmacro))
816 break; 820 break;
@@ -1311,13 +1315,16 @@ DEFUN ("autoload", Fautoload, Sautoload, 2, 5, 0,
1311FUNCTION is a symbol; FILE is a file name string to pass to `load'.\n\ 1315FUNCTION is a symbol; FILE is a file name string to pass to `load'.\n\
1312Third arg DOCSTRING is documentation for the function.\n\ 1316Third arg DOCSTRING is documentation for the function.\n\
1313Fourth arg INTERACTIVE if non-nil says function can be called interactively.\n\ 1317Fourth arg INTERACTIVE if non-nil says function can be called interactively.\n\
1314Fifth arg MACRO if non-nil says the function is really a macro.\n\ 1318Fifth arg TYPE indicates the type of the object:\n\
1319 nil or omitted says FUNCTION is a function,\n\
1320 `keymap' says FUNCTION is really a keymap, and\n\
1321 `macro' or t says FUNCTION is really a macro.\n\
1315Third through fifth args give info about the real definition.\n\ 1322Third through fifth args give info about the real definition.\n\
1316They default to nil.\n\ 1323They default to nil.\n\
1317If FUNCTION is already defined other than as an autoload,\n\ 1324If FUNCTION is already defined other than as an autoload,\n\
1318this does nothing and returns nil.") 1325this does nothing and returns nil.")
1319 (function, file, docstring, interactive, macro) 1326 (function, file, docstring, interactive, type)
1320 Lisp_Object function, file, docstring, interactive, macro; 1327 Lisp_Object function, file, docstring, interactive, type;
1321{ 1328{
1322#ifdef NO_ARG_ARRAY 1329#ifdef NO_ARG_ARRAY
1323 Lisp_Object args[4]; 1330 Lisp_Object args[4];
@@ -1336,7 +1343,7 @@ this does nothing and returns nil.")
1336 args[0] = file; 1343 args[0] = file;
1337 args[1] = docstring; 1344 args[1] = docstring;
1338 args[2] = interactive; 1345 args[2] = interactive;
1339 args[3] = macro; 1346 args[3] = type;
1340 1347
1341 return Ffset (function, Fcons (Qautoload, Flist (4, &args[0]))); 1348 return Ffset (function, Fcons (Qautoload, Flist (4, &args[0])));
1342#else /* NO_ARG_ARRAY */ 1349#else /* NO_ARG_ARRAY */