Mercurial > emacs
comparison src/eval.c @ 10161:512a84fb3c75
(Fdefconst, Fdefvar): Error if too many arguments.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Thu, 15 Dec 1994 00:42:19 +0000 |
parents | c942c7e6ebbd |
children | 03f3a1f4264a |
comparison
equal
deleted
inserted
replaced
10160:29c400c63312 | 10161:512a84fb3c75 |
---|---|
569 This means that M-x set-variable and M-x edit-options recognize it.\n\ | 569 This means that M-x set-variable and M-x edit-options recognize it.\n\ |
570 If INITVALUE is missing, SYMBOL's value is not set.") | 570 If INITVALUE is missing, SYMBOL's value is not set.") |
571 (args) | 571 (args) |
572 Lisp_Object args; | 572 Lisp_Object args; |
573 { | 573 { |
574 register Lisp_Object sym, tem; | 574 register Lisp_Object sym, tem, tail; |
575 | 575 |
576 sym = Fcar (args); | 576 sym = Fcar (args); |
577 tem = Fcdr (args); | 577 tail = Fcdr (args); |
578 if (!NILP (tem)) | 578 if (!NILP (Fcdr (Fcdr (tail)))) |
579 error ("too many arguments"); | |
580 | |
581 if (!NILP (tail)) | |
579 { | 582 { |
580 tem = Fdefault_boundp (sym); | 583 tem = Fdefault_boundp (sym); |
581 if (NILP (tem)) | 584 if (NILP (tem)) |
582 Fset_default (sym, Feval (Fcar (Fcdr (args)))); | 585 Fset_default (sym, Feval (Fcar (Fcdr (args)))); |
583 } | 586 } |
584 tem = Fcar (Fcdr (Fcdr (args))); | 587 tail = Fcdr (Fcdr (args)); |
585 if (!NILP (tem)) | 588 if (!NILP (Fcar (tail))) |
586 { | 589 { |
587 if (!NILP (Vpurify_flag)) | 590 if (!NILP (Vpurify_flag)) |
588 tem = Fpurecopy (tem); | 591 tem = Fpurecopy (tem); |
589 Fput (sym, Qvariable_documentation, tem); | 592 Fput (sym, Qvariable_documentation, tem); |
590 } | 593 } |
610 Lisp_Object args; | 613 Lisp_Object args; |
611 { | 614 { |
612 register Lisp_Object sym, tem; | 615 register Lisp_Object sym, tem; |
613 | 616 |
614 sym = Fcar (args); | 617 sym = Fcar (args); |
618 if (!NILP (Fcdr (Fcdr (Fcdr (args))))) | |
619 error ("too many arguments"); | |
620 | |
615 Fset_default (sym, Feval (Fcar (Fcdr (args)))); | 621 Fset_default (sym, Feval (Fcar (Fcdr (args)))); |
616 tem = Fcar (Fcdr (Fcdr (args))); | 622 tem = Fcar (Fcdr (Fcdr (args))); |
617 if (!NILP (tem)) | 623 if (!NILP (tem)) |
618 { | 624 { |
619 if (!NILP (Vpurify_flag)) | 625 if (!NILP (Vpurify_flag)) |