comparison src/eval.c @ 83653:2a69b973fae2

Merge from emacs--devo--0 Patches applied: * emacs--devo--0 (patch 852-856) - Update from CVS - Merge from emacs--rel--22 * emacs--rel--22 (patch 93-96) - Update from CVS - Merge from gnus--rel--5.10 * gnus--rel--5.10 (patch 245) - Update from CVS Revision: emacs@sv.gnu.org/emacs--multi-tty--0--patch-32
author Miles Bader <miles@gnu.org>
date Tue, 21 Aug 2007 04:55:30 +0000
parents 5b644ae74c91 617c0965e1f4
children b1c7d00cbbb0
comparison
equal deleted inserted replaced
83652:5b644ae74c91 83653:2a69b973fae2
200 200
201 Lisp_Object Vmacro_declaration_function; 201 Lisp_Object Vmacro_declaration_function;
202 202
203 extern Lisp_Object Qrisky_local_variable; 203 extern Lisp_Object Qrisky_local_variable;
204 204
205 extern Lisp_Object Qfunction;
206
205 static Lisp_Object funcall_lambda P_ ((Lisp_Object, int, Lisp_Object*)); 207 static Lisp_Object funcall_lambda P_ ((Lisp_Object, int, Lisp_Object*));
206 static void unwind_to_catch P_ ((struct catchtag *, Lisp_Object)) NO_RETURN; 208 static void unwind_to_catch P_ ((struct catchtag *, Lisp_Object)) NO_RETURN;
207 209
208 #if __GNUC__ 210 #if __GNUC__
209 /* "gcc -O3" enables automatic function inlining, which optimizes out 211 /* "gcc -O3" enables automatic function inlining, which optimizes out
537 { 539 {
538 register Lisp_Object args_left; 540 register Lisp_Object args_left;
539 register Lisp_Object val, sym; 541 register Lisp_Object val, sym;
540 struct gcpro gcpro1; 542 struct gcpro gcpro1;
541 543
542 if (NILP(args)) 544 if (NILP (args))
543 return Qnil; 545 return Qnil;
544 546
545 args_left = args; 547 args_left = args;
546 GCPRO1 (args); 548 GCPRO1 (args);
547 549
562 doc: /* Return the argument, without evaluating it. `(quote x)' yields `x'. 564 doc: /* Return the argument, without evaluating it. `(quote x)' yields `x'.
563 usage: (quote ARG) */) 565 usage: (quote ARG) */)
564 (args) 566 (args)
565 Lisp_Object args; 567 Lisp_Object args;
566 { 568 {
569 if (!NILP (Fcdr (args)))
570 xsignal2 (Qwrong_number_of_arguments, Qquote, Flength (args));
567 return Fcar (args); 571 return Fcar (args);
568 } 572 }
569 573
570 DEFUN ("function", Ffunction, Sfunction, 1, UNEVALLED, 0, 574 DEFUN ("function", Ffunction, Sfunction, 1, UNEVALLED, 0,
571 doc: /* Like `quote', but preferred for objects which are functions. 575 doc: /* Like `quote', but preferred for objects which are functions.
573 `quote' cannot do that. 577 `quote' cannot do that.
574 usage: (function ARG) */) 578 usage: (function ARG) */)
575 (args) 579 (args)
576 Lisp_Object args; 580 Lisp_Object args;
577 { 581 {
582 if (!NILP (Fcdr (args)))
583 xsignal2 (Qwrong_number_of_arguments, Qfunction, Flength (args));
578 return Fcar (args); 584 return Fcar (args);
579 } 585 }
580 586
581 587
582 DEFUN ("interactive-p", Finteractive_p, Sinteractive_p, 0, 0, 0, 588 DEFUN ("interactive-p", Finteractive_p, Sinteractive_p, 0, 0, 0,
2081 return ((ASIZE (fun) & PSEUDOVECTOR_SIZE_MASK) > COMPILED_INTERACTIVE 2087 return ((ASIZE (fun) & PSEUDOVECTOR_SIZE_MASK) > COMPILED_INTERACTIVE
2082 ? Qt : if_prop); 2088 ? Qt : if_prop);
2083 2089
2084 /* Strings and vectors are keyboard macros. */ 2090 /* Strings and vectors are keyboard macros. */
2085 if (STRINGP (fun) || VECTORP (fun)) 2091 if (STRINGP (fun) || VECTORP (fun))
2086 return NILP (for_call_interactively) ? Qt : Qnil; 2092 return (NILP (for_call_interactively) ? Qt : Qnil);
2087 2093
2088 /* Lists may represent commands. */ 2094 /* Lists may represent commands. */
2089 if (!CONSP (fun)) 2095 if (!CONSP (fun))
2090 return Qnil; 2096 return Qnil;
2091 funcar = XCAR (fun); 2097 funcar = XCAR (fun);