Mercurial > emacs
comparison src/data.c @ 7206:b6aa3d718d8a
(Ffset, Ffmakunbound): Signal an error if SYM is nil or t.
author | Karl Heuer <kwzh@gnu.org> |
---|---|
date | Fri, 29 Apr 1994 23:21:37 +0000 |
parents | a5199564772e |
children | cd81dba38a49 |
comparison
equal
deleted
inserted
replaced
7205:a5199564772e | 7206:b6aa3d718d8a |
---|---|
504 DEFUN ("fmakunbound", Ffmakunbound, Sfmakunbound, 1, 1, 0, "Make SYMBOL's function definition be void.") | 504 DEFUN ("fmakunbound", Ffmakunbound, Sfmakunbound, 1, 1, 0, "Make SYMBOL's function definition be void.") |
505 (sym) | 505 (sym) |
506 register Lisp_Object sym; | 506 register Lisp_Object sym; |
507 { | 507 { |
508 CHECK_SYMBOL (sym, 0); | 508 CHECK_SYMBOL (sym, 0); |
509 if (NILP (sym) || EQ (sym, Qt)) | |
510 return Fsignal (Qsetting_constant, Fcons (sym, Qnil)); | |
509 XSYMBOL (sym)->function = Qunbound; | 511 XSYMBOL (sym)->function = Qunbound; |
510 return sym; | 512 return sym; |
511 } | 513 } |
512 | 514 |
513 DEFUN ("symbol-function", Fsymbol_function, Ssymbol_function, 1, 1, 0, | 515 DEFUN ("symbol-function", Fsymbol_function, Ssymbol_function, 1, 1, 0, |
544 "Set SYMBOL's function definition to NEWVAL, and return NEWVAL.") | 546 "Set SYMBOL's function definition to NEWVAL, and return NEWVAL.") |
545 (sym, newdef) | 547 (sym, newdef) |
546 register Lisp_Object sym, newdef; | 548 register Lisp_Object sym, newdef; |
547 { | 549 { |
548 CHECK_SYMBOL (sym, 0); | 550 CHECK_SYMBOL (sym, 0); |
549 | 551 if (NILP (sym) || EQ (sym, Qt)) |
552 return Fsignal (Qsetting_constant, Fcons (sym, Qnil)); | |
550 if (!NILP (Vautoload_queue) && !EQ (XSYMBOL (sym)->function, Qunbound)) | 553 if (!NILP (Vautoload_queue) && !EQ (XSYMBOL (sym)->function, Qunbound)) |
551 Vautoload_queue = Fcons (Fcons (sym, XSYMBOL (sym)->function), | 554 Vautoload_queue = Fcons (Fcons (sym, XSYMBOL (sym)->function), |
552 Vautoload_queue); | 555 Vautoload_queue); |
553 XSYMBOL (sym)->function = newdef; | 556 XSYMBOL (sym)->function = newdef; |
554 return newdef; | 557 return newdef; |