Mercurial > emacs
comparison src/data.c @ 2606:6bf6499fe4db
(Fdefine_function): New function (same code as Fdefalias).
| author | Richard M. Stallman <rms@gnu.org> |
|---|---|
| date | Thu, 29 Apr 1993 13:12:37 +0000 |
| parents | c1a1557bffde |
| children | 425c4138af31 |
comparison
equal
deleted
inserted
replaced
| 2605:b3c605e9bb30 | 2606:6bf6499fe4db |
|---|---|
| 523 Vautoload_queue); | 523 Vautoload_queue); |
| 524 XSYMBOL (sym)->function = newdef; | 524 XSYMBOL (sym)->function = newdef; |
| 525 return newdef; | 525 return newdef; |
| 526 } | 526 } |
| 527 | 527 |
| 528 /* This name should be removed once it is eliminated from elsewhere. */ | |
| 529 | |
| 528 DEFUN ("defalias", Fdefalias, Sdefalias, 2, 2, 0, | 530 DEFUN ("defalias", Fdefalias, Sdefalias, 2, 2, 0, |
| 531 "Set SYMBOL's function definition to NEWVAL, and return NEWVAL.\n\ | |
| 532 Associates the function with the current load file, if any.") | |
| 533 (sym, newdef) | |
| 534 register Lisp_Object sym, newdef; | |
| 535 { | |
| 536 CHECK_SYMBOL (sym, 0); | |
| 537 if (!NILP (Vautoload_queue) && !EQ (XSYMBOL (sym)->function, Qunbound)) | |
| 538 Vautoload_queue = Fcons (Fcons (sym, XSYMBOL (sym)->function), | |
| 539 Vautoload_queue); | |
| 540 XSYMBOL (sym)->function = newdef; | |
| 541 LOADHIST_ATTACH (sym); | |
| 542 return newdef; | |
| 543 } | |
| 544 | |
| 545 DEFUN ("define-function", Fdefine_function, Sdefine_function, 2, 2, 0, | |
| 529 "Set SYMBOL's function definition to NEWVAL, and return NEWVAL.\n\ | 546 "Set SYMBOL's function definition to NEWVAL, and return NEWVAL.\n\ |
| 530 Associates the function with the current load file, if any.") | 547 Associates the function with the current load file, if any.") |
| 531 (sym, newdef) | 548 (sym, newdef) |
| 532 register Lisp_Object sym, newdef; | 549 register Lisp_Object sym, newdef; |
| 533 { | 550 { |
| 2152 defsubr (&Sfmakunbound); | 2169 defsubr (&Sfmakunbound); |
| 2153 defsubr (&Sboundp); | 2170 defsubr (&Sboundp); |
| 2154 defsubr (&Sfboundp); | 2171 defsubr (&Sfboundp); |
| 2155 defsubr (&Sfset); | 2172 defsubr (&Sfset); |
| 2156 defsubr (&Sdefalias); | 2173 defsubr (&Sdefalias); |
| 2174 defsubr (&Sdefine_function); | |
| 2157 defsubr (&Ssetplist); | 2175 defsubr (&Ssetplist); |
| 2158 defsubr (&Ssymbol_value); | 2176 defsubr (&Ssymbol_value); |
| 2159 defsubr (&Sset); | 2177 defsubr (&Sset); |
| 2160 defsubr (&Sdefault_boundp); | 2178 defsubr (&Sdefault_boundp); |
| 2161 defsubr (&Sdefault_value); | 2179 defsubr (&Sdefault_value); |
