Mercurial > hg > xemacs-beta
changeset 5207:1096ef427b56
Error on too many arguments to #'function, #'quote.
2010-04-29 Aidan Kehoe <kehoea@parhasard.net>
* eval.c (Fquote, Ffunction): Error on more than one argument to
these special operators.
* data.c (syms_of_data): Move Qquote to general-slots.h from this
file, now it's used in eval.c
author | Aidan Kehoe <kehoea@parhasard.net> |
---|---|
date | Thu, 29 Apr 2010 15:49:21 +0100 |
parents | 39d74978fd32 |
children | 9fa29ec759e3 |
files | src/ChangeLog src/data.c src/eval.c src/general-slots.h |
diffstat | 4 files changed, 27 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog Sat Apr 17 10:40:03 2010 +0100 +++ b/src/ChangeLog Thu Apr 29 15:49:21 2010 +0100 @@ -1,3 +1,10 @@ +2010-04-29 Aidan Kehoe <kehoea@parhasard.net> + + * eval.c (Fquote, Ffunction): Error on more than one argument to + these special operators. + * data.c (syms_of_data): Move Qquote to general-slots.h from this + file, now it's used in eval.c + 2010-04-17 Aidan Kehoe <kehoea@parhasard.net> * doc.c (Fdocumentation):
--- a/src/data.c Sat Apr 17 10:40:03 2010 +0100 +++ b/src/data.c Thu Apr 29 15:49:21 2010 +0100 @@ -34,7 +34,7 @@ #include "syssignal.h" #include "sysfloat.h" -Lisp_Object Qnil, Qt, Qquote, Qlambda, Qunbound; +Lisp_Object Qnil, Qt, Qlambda, Qunbound; Lisp_Object Qerror_conditions, Qerror_message; Lisp_Object Qerror, Qquit, Qsyntax_error, Qinvalid_read_syntax; Lisp_Object Qlist_formation_error, Qstructure_formation_error; @@ -3516,7 +3516,6 @@ INIT_LISP_OBJECT (ephemeron); INIT_LISP_OBJECT (weak_box); - DEFSYMBOL (Qquote); DEFSYMBOL (Qlambda); DEFSYMBOL (Qlistp); DEFSYMBOL (Qtrue_list_p);
--- a/src/eval.c Sat Apr 17 10:40:03 2010 +0100 +++ b/src/eval.c Thu Apr 29 15:49:21 2010 +0100 @@ -1273,6 +1273,15 @@ */ (args)) { + int nargs; + + GET_LIST_LENGTH (args, nargs); + if (nargs != 1) + { + Fsignal (Qwrong_number_of_arguments, + list2 (Qquote, make_int (nargs))); + } + return XCAR (args); } @@ -1344,6 +1353,15 @@ */ (args)) { + int nargs; + + GET_LIST_LENGTH (args, nargs); + if (nargs != 1) + { + Fsignal (Qwrong_number_of_arguments, + list2 (Qfunction, make_int (nargs))); + } + return XCAR (args); }