From: Richard M. Stallman Date: Sun, 19 Aug 2007 01:59:48 +0000 (+0000) Subject: (Ffunction, Fquote): Signal error if not 1 argument. X-Git-Tag: emacs-pretest-23.0.90~11450 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=1283140e1ec8eb6acf5de2d707784ae87f9f5bc0;p=emacs.git (Ffunction, Fquote): Signal error if not 1 argument. --- diff --git a/src/ChangeLog b/src/ChangeLog index 038e8cc5470..3962c174970 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2007-08-19 Richard Stallman + + * eval.c (Ffunction, Fquote): Signal error if not 1 argument. + 2007-08-19 Andreas Schwab * alloc.c (pure): Round PURESIZE up. diff --git a/src/eval.c b/src/eval.c index e53d164a354..20be847f273 100644 --- a/src/eval.c +++ b/src/eval.c @@ -202,6 +202,8 @@ Lisp_Object Vmacro_declaration_function; extern Lisp_Object Qrisky_local_variable; +extern Lisp_Object Qfunction; + static Lisp_Object funcall_lambda P_ ((Lisp_Object, int, Lisp_Object*)); static void unwind_to_catch P_ ((struct catchtag *, Lisp_Object)) NO_RETURN; @@ -539,7 +541,7 @@ usage: (setq [SYM VAL]...) */) register Lisp_Object val, sym; struct gcpro gcpro1; - if (NILP(args)) + if (NILP (args)) return Qnil; args_left = args; @@ -564,6 +566,8 @@ usage: (quote ARG) */) (args) Lisp_Object args; { + if (!NILP (Fcdr (args))) + xsignal2 (Qwrong_number_of_arguments, Qquote, Flength (args)); return Fcar (args); } @@ -575,6 +579,8 @@ usage: (function ARG) */) (args) Lisp_Object args; { + if (!NILP (Fcdr (args))) + xsignal2 (Qwrong_number_of_arguments, Qfunction, Flength (args)); return Fcar (args); }