changeset 82463:617c0965e1f4

(Ffunction, Fquote): Signal error if not 1 argument.
author Richard M. Stallman <rms@gnu.org>
date Sun, 19 Aug 2007 01:56:15 +0000
parents 4832d8e5a326
children 858e3a792169
files src/eval.c
diffstat 1 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/eval.c	Sun Aug 19 00:24:21 2007 +0000
+++ b/src/eval.c	Sun Aug 19 01:56:15 2007 +0000
@@ -202,6 +202,8 @@
 
 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 @@
   register Lisp_Object val, sym;
   struct gcpro gcpro1;
 
-  if (NILP(args))
+  if (NILP (args))
     return Qnil;
 
   args_left = args;
@@ -564,6 +566,8 @@
      (args)
      Lisp_Object args;
 {
+  if (!NILP (Fcdr (args)))
+    xsignal2 (Qwrong_number_of_arguments, Qquote, Flength (args));
   return Fcar (args);
 }
 
@@ -575,6 +579,8 @@
      (args)
      Lisp_Object args;
 {
+  if (!NILP (Fcdr (args)))
+    xsignal2 (Qwrong_number_of_arguments, Qfunction, Flength (args));
   return Fcar (args);
 }