# HG changeset patch # User Richard M. Stallman # Date 735010188 0 # Node ID b66eeded6afc10aa9fe000d97572223bb13c00a3 # Parent c73c68a87cd5bc9c86d2b4b98958b9a02f57419d (Fdefine_function): New function. diff -r c73c68a87cd5 -r b66eeded6afc src/data.c --- a/src/data.c Sat Apr 17 01:28:10 1993 +0000 +++ b/src/data.c Sat Apr 17 01:29:48 1993 +0000 @@ -525,6 +525,21 @@ return newdef; } +DEFUN ("define-function", Fdefine_function, Sdefine_function, 2, 2, 0, + "Set SYMBOL's function definition to NEWVAL, and return NEWVAL.\n\ +Associates the function with the current load file, if any.") + (sym, newdef) + register Lisp_Object sym, newdef; +{ + CHECK_SYMBOL (sym, 0); + if (!NILP (Vautoload_queue) && !EQ (XSYMBOL (sym)->function, Qunbound)) + Vautoload_queue = Fcons (Fcons (sym, XSYMBOL (sym)->function), + Vautoload_queue); + XSYMBOL (sym)->function = newdef; + LOADHIST_ATTACH (sym); + return newdef; +} + DEFUN ("setplist", Fsetplist, Ssetplist, 2, 2, 0, "Set SYMBOL's property list to NEWVAL, and return NEWVAL.") (sym, newplist) @@ -2138,6 +2153,7 @@ defsubr (&Sboundp); defsubr (&Sfboundp); defsubr (&Sfset); + defsubr (&Sdefine_function); defsubr (&Ssetplist); defsubr (&Ssymbol_value); defsubr (&Sset);