aboutsummaryrefslogtreecommitdiffstats
path: root/src/eval.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/eval.c')
-rw-r--r--src/eval.c487
1 files changed, 195 insertions, 292 deletions
diff --git a/src/eval.c b/src/eval.c
index a6290618753..ec031f391c8 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -1,7 +1,7 @@
1/* Evaluator for GNU Emacs Lisp interpreter. 1/* Evaluator for GNU Emacs Lisp interpreter.
2 Copyright (C) 1985, 1986, 1987, 1993, 1994, 1995, 1999, 2000, 2001, 2 Copyright (C) 1985, 1986, 1987, 1993, 1994, 1995, 1999, 2000, 2001,
3 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 3 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
4 Free Software Foundation, Inc. 4 Free Software Foundation, Inc.
5 5
6This file is part of GNU Emacs. 6This file is part of GNU Emacs.
7 7
@@ -179,21 +179,12 @@ Lisp_Object Vmacro_declaration_function;
179extern Lisp_Object Qrisky_local_variable; 179extern Lisp_Object Qrisky_local_variable;
180extern Lisp_Object Qfunction; 180extern Lisp_Object Qfunction;
181 181
182static Lisp_Object funcall_lambda P_ ((Lisp_Object, int, Lisp_Object *, 182static Lisp_Object funcall_lambda (Lisp_Object, int, Lisp_Object *,
183 Lisp_Object)); 183 Lisp_Object);
184 184static void unwind_to_catch (struct catchtag *, Lisp_Object) NO_RETURN;
185static void unwind_to_catch P_ ((struct catchtag *, Lisp_Object)) NO_RETURN;
186
187#if __GNUC__
188/* "gcc -O3" enables automatic function inlining, which optimizes out
189 the arguments for the invocations of these functions, whereas they
190 expect these values on the stack. */
191Lisp_Object apply1 () __attribute__((noinline));
192Lisp_Object call2 () __attribute__((noinline));
193#endif
194 185
195void 186void
196init_eval_once () 187init_eval_once (void)
197{ 188{
198 specpdl_size = 50; 189 specpdl_size = 50;
199 specpdl = (struct specbinding *) xmalloc (specpdl_size * sizeof (struct specbinding)); 190 specpdl = (struct specbinding *) xmalloc (specpdl_size * sizeof (struct specbinding));
@@ -206,7 +197,7 @@ init_eval_once ()
206} 197}
207 198
208void 199void
209init_eval () 200init_eval (void)
210{ 201{
211 specpdl_ptr = specpdl; 202 specpdl_ptr = specpdl;
212 catchlist = 0; 203 catchlist = 0;
@@ -225,8 +216,7 @@ init_eval ()
225/* unwind-protect function used by call_debugger. */ 216/* unwind-protect function used by call_debugger. */
226 217
227static Lisp_Object 218static Lisp_Object
228restore_stack_limits (data) 219restore_stack_limits (Lisp_Object data)
229 Lisp_Object data;
230{ 220{
231 max_specpdl_size = XINT (XCAR (data)); 221 max_specpdl_size = XINT (XCAR (data));
232 max_lisp_eval_depth = XINT (XCDR (data)); 222 max_lisp_eval_depth = XINT (XCDR (data));
@@ -236,8 +226,7 @@ restore_stack_limits (data)
236/* Call the Lisp debugger, giving it argument ARG. */ 226/* Call the Lisp debugger, giving it argument ARG. */
237 227
238Lisp_Object 228Lisp_Object
239call_debugger (arg) 229call_debugger (Lisp_Object arg)
240 Lisp_Object arg;
241{ 230{
242 int debug_while_redisplaying; 231 int debug_while_redisplaying;
243 int count = SPECPDL_INDEX (); 232 int count = SPECPDL_INDEX ();
@@ -293,8 +282,7 @@ call_debugger (arg)
293} 282}
294 283
295void 284void
296do_debug_on_call (code) 285do_debug_on_call (Lisp_Object code)
297 Lisp_Object code;
298{ 286{
299 debug_on_next_call = 0; 287 debug_on_next_call = 0;
300 backtrace_list->debug_on_exit = 1; 288 backtrace_list->debug_on_exit = 1;
@@ -310,8 +298,7 @@ DEFUN ("or", For, Sor, 0, UNEVALLED, 0,
310The remaining args are not evalled at all. 298The remaining args are not evalled at all.
311If all args return nil, return nil. 299If all args return nil, return nil.
312usage: (or CONDITIONS...) */) 300usage: (or CONDITIONS...) */)
313 (args) 301 (Lisp_Object args)
314 Lisp_Object args;
315{ 302{
316 register Lisp_Object val = Qnil; 303 register Lisp_Object val = Qnil;
317 struct gcpro gcpro1; 304 struct gcpro gcpro1;
@@ -335,8 +322,7 @@ DEFUN ("and", Fand, Sand, 0, UNEVALLED, 0,
335The remaining args are not evalled at all. 322The remaining args are not evalled at all.
336If no arg yields nil, return the last arg's value. 323If no arg yields nil, return the last arg's value.
337usage: (and CONDITIONS...) */) 324usage: (and CONDITIONS...) */)
338 (args) 325 (Lisp_Object args)
339 Lisp_Object args;
340{ 326{
341 register Lisp_Object val = Qt; 327 register Lisp_Object val = Qt;
342 struct gcpro gcpro1; 328 struct gcpro gcpro1;
@@ -361,8 +347,7 @@ Returns the value of THEN or the value of the last of the ELSE's.
361THEN must be one expression, but ELSE... can be zero or more expressions. 347THEN must be one expression, but ELSE... can be zero or more expressions.
362If COND yields nil, and there are no ELSE's, the value is nil. 348If COND yields nil, and there are no ELSE's, the value is nil.
363usage: (if COND THEN ELSE...) */) 349usage: (if COND THEN ELSE...) */)
364 (args) 350 (Lisp_Object args)
365 Lisp_Object args;
366{ 351{
367 register Lisp_Object cond; 352 register Lisp_Object cond;
368 struct gcpro gcpro1; 353 struct gcpro gcpro1;
@@ -386,8 +371,7 @@ If no clause succeeds, cond returns nil.
386If a clause has one element, as in (CONDITION), 371If a clause has one element, as in (CONDITION),
387CONDITION's value if non-nil is returned from the cond-form. 372CONDITION's value if non-nil is returned from the cond-form.
388usage: (cond CLAUSES...) */) 373usage: (cond CLAUSES...) */)
389 (args) 374 (Lisp_Object args)
390 Lisp_Object args;
391{ 375{
392 register Lisp_Object clause, val; 376 register Lisp_Object clause, val;
393 struct gcpro gcpro1; 377 struct gcpro gcpro1;
@@ -414,8 +398,7 @@ usage: (cond CLAUSES...) */)
414DEFUN ("progn", Fprogn, Sprogn, 0, UNEVALLED, 0, 398DEFUN ("progn", Fprogn, Sprogn, 0, UNEVALLED, 0,
415 doc: /* Eval BODY forms sequentially and return value of last one. 399 doc: /* Eval BODY forms sequentially and return value of last one.
416usage: (progn BODY...) */) 400usage: (progn BODY...) */)
417 (args) 401 (Lisp_Object args)
418 Lisp_Object args;
419{ 402{
420 register Lisp_Object val = Qnil; 403 register Lisp_Object val = Qnil;
421 struct gcpro gcpro1; 404 struct gcpro gcpro1;
@@ -437,8 +420,7 @@ DEFUN ("prog1", Fprog1, Sprog1, 1, UNEVALLED, 0,
437The value of FIRST is saved during the evaluation of the remaining args, 420The value of FIRST is saved during the evaluation of the remaining args,
438whose values are discarded. 421whose values are discarded.
439usage: (prog1 FIRST BODY...) */) 422usage: (prog1 FIRST BODY...) */)
440 (args) 423 (Lisp_Object args)
441 Lisp_Object args;
442{ 424{
443 Lisp_Object val; 425 Lisp_Object val;
444 register Lisp_Object args_left; 426 register Lisp_Object args_left;
@@ -455,7 +437,7 @@ usage: (prog1 FIRST BODY...) */)
455 do 437 do
456 { 438 {
457 if (!(argnum++)) 439 if (!(argnum++))
458 val = Feval (Fcar (args_left)); 440 val = Feval (Fcar (args_left));
459 else 441 else
460 Feval (Fcar (args_left)); 442 Feval (Fcar (args_left));
461 args_left = Fcdr (args_left); 443 args_left = Fcdr (args_left);
@@ -471,8 +453,7 @@ DEFUN ("prog2", Fprog2, Sprog2, 2, UNEVALLED, 0,
471The value of FORM2 is saved during the evaluation of the 453The value of FORM2 is saved during the evaluation of the
472remaining args, whose values are discarded. 454remaining args, whose values are discarded.
473usage: (prog2 FORM1 FORM2 BODY...) */) 455usage: (prog2 FORM1 FORM2 BODY...) */)
474 (args) 456 (Lisp_Object args)
475 Lisp_Object args;
476{ 457{
477 Lisp_Object val; 458 Lisp_Object val;
478 register Lisp_Object args_left; 459 register Lisp_Object args_left;
@@ -491,7 +472,7 @@ usage: (prog2 FORM1 FORM2 BODY...) */)
491 do 472 do
492 { 473 {
493 if (!(argnum++)) 474 if (!(argnum++))
494 val = Feval (Fcar (args_left)); 475 val = Feval (Fcar (args_left));
495 else 476 else
496 Feval (Fcar (args_left)); 477 Feval (Fcar (args_left));
497 args_left = Fcdr (args_left); 478 args_left = Fcdr (args_left);
@@ -511,8 +492,7 @@ The second VAL is not computed until after the first SYM is set, and so on;
511each VAL can use the new value of variables set earlier in the `setq'. 492each VAL can use the new value of variables set earlier in the `setq'.
512The return value of the `setq' form is the value of the last VAL. 493The return value of the `setq' form is the value of the last VAL.
513usage: (setq [SYM VAL]...) */) 494usage: (setq [SYM VAL]...) */)
514 (args) 495 (Lisp_Object args)
515 Lisp_Object args;
516{ 496{
517 register Lisp_Object args_left; 497 register Lisp_Object args_left;
518 register Lisp_Object val, sym, lex_binding; 498 register Lisp_Object val, sym, lex_binding;
@@ -548,8 +528,7 @@ usage: (setq [SYM VAL]...) */)
548DEFUN ("quote", Fquote, Squote, 1, UNEVALLED, 0, 528DEFUN ("quote", Fquote, Squote, 1, UNEVALLED, 0,
549 doc: /* Return the argument, without evaluating it. `(quote x)' yields `x'. 529 doc: /* Return the argument, without evaluating it. `(quote x)' yields `x'.
550usage: (quote ARG) */) 530usage: (quote ARG) */)
551 (args) 531 (Lisp_Object args)
552 Lisp_Object args;
553{ 532{
554 if (!NILP (Fcdr (args))) 533 if (!NILP (Fcdr (args)))
555 xsignal2 (Qwrong_number_of_arguments, Qquote, Flength (args)); 534 xsignal2 (Qwrong_number_of_arguments, Qquote, Flength (args));
@@ -561,8 +540,7 @@ DEFUN ("function", Ffunction, Sfunction, 1, UNEVALLED, 0,
561In byte compilation, `function' causes its argument to be compiled. 540In byte compilation, `function' causes its argument to be compiled.
562`quote' cannot do that. 541`quote' cannot do that.
563usage: (function ARG) */) 542usage: (function ARG) */)
564 (args) 543 (Lisp_Object args)
565 Lisp_Object args;
566{ 544{
567 Lisp_Object quoted = XCAR (args); 545 Lisp_Object quoted = XCAR (args);
568 546
@@ -598,7 +576,7 @@ To test whether your function was called with `call-interactively',
598either (i) add an extra optional argument and give it an `interactive' 576either (i) add an extra optional argument and give it an `interactive'
599spec that specifies non-nil unconditionally (such as \"p\"); or (ii) 577spec that specifies non-nil unconditionally (such as \"p\"); or (ii)
600use `called-interactively-p'. */) 578use `called-interactively-p'. */)
601 () 579 (void)
602{ 580{
603 return interactive_p (1) ? Qt : Qnil; 581 return interactive_p (1) ? Qt : Qnil;
604} 582}
@@ -624,8 +602,7 @@ function-modifying features. Instead of using this, it is sometimes
624cleaner to give your function an extra optional argument whose 602cleaner to give your function an extra optional argument whose
625`interactive' spec specifies non-nil unconditionally (\"p\" is a good 603`interactive' spec specifies non-nil unconditionally (\"p\" is a good
626way to do this), or via (not (or executing-kbd-macro noninteractive)). */) 604way to do this), or via (not (or executing-kbd-macro noninteractive)). */)
627 (kind) 605 (Lisp_Object kind)
628 Lisp_Object kind;
629{ 606{
630 return ((INTERACTIVE || !EQ (kind, intern ("interactive"))) 607 return ((INTERACTIVE || !EQ (kind, intern ("interactive")))
631 && interactive_p (1)) ? Qt : Qnil; 608 && interactive_p (1)) ? Qt : Qnil;
@@ -639,8 +616,7 @@ way to do this), or via (not (or executing-kbd-macro noninteractive)). */)
639 called is a built-in. */ 616 called is a built-in. */
640 617
641int 618int
642interactive_p (exclude_subrs_p) 619interactive_p (int exclude_subrs_p)
643 int exclude_subrs_p;
644{ 620{
645 struct backtrace *btp; 621 struct backtrace *btp;
646 Lisp_Object fun; 622 Lisp_Object fun;
@@ -687,8 +663,7 @@ DEFUN ("defun", Fdefun, Sdefun, 2, UNEVALLED, 0,
687The definition is (lambda ARGLIST [DOCSTRING] BODY...). 663The definition is (lambda ARGLIST [DOCSTRING] BODY...).
688See also the function `interactive'. 664See also the function `interactive'.
689usage: (defun NAME ARGLIST [DOCSTRING] BODY...) */) 665usage: (defun NAME ARGLIST [DOCSTRING] BODY...) */)
690 (args) 666 (Lisp_Object args)
691 Lisp_Object args;
692{ 667{
693 register Lisp_Object fn_name; 668 register Lisp_Object fn_name;
694 register Lisp_Object defn; 669 register Lisp_Object defn;
@@ -733,8 +708,7 @@ The elements can look like this:
733 Set NAME's `doc-string-elt' property to ELT. 708 Set NAME's `doc-string-elt' property to ELT.
734 709
735usage: (defmacro NAME ARGLIST [DOCSTRING] [DECL] BODY...) */) 710usage: (defmacro NAME ARGLIST [DOCSTRING] [DECL] BODY...) */)
736 (args) 711 (Lisp_Object args)
737 Lisp_Object args;
738{ 712{
739 register Lisp_Object fn_name; 713 register Lisp_Object fn_name;
740 register Lisp_Object defn; 714 register Lisp_Object defn;
@@ -796,8 +770,7 @@ or of the variable at the end of the chain of aliases, if BASE-VARIABLE is
796itself an alias. If NEW-ALIAS is bound, and BASE-VARIABLE is not, 770itself an alias. If NEW-ALIAS is bound, and BASE-VARIABLE is not,
797then the value of BASE-VARIABLE is set to that of NEW-ALIAS. 771then the value of BASE-VARIABLE is set to that of NEW-ALIAS.
798The return value is BASE-VARIABLE. */) 772The return value is BASE-VARIABLE. */)
799 (new_alias, base_variable, docstring) 773 (Lisp_Object new_alias, Lisp_Object base_variable, Lisp_Object docstring)
800 Lisp_Object new_alias, base_variable, docstring;
801{ 774{
802 struct Lisp_Symbol *sym; 775 struct Lisp_Symbol *sym;
803 776
@@ -869,8 +842,7 @@ load a file defining variables, with this form or with `defconst' or
869for these variables. \(`defconst' and `defcustom' behave similarly in 842for these variables. \(`defconst' and `defcustom' behave similarly in
870this respect.) 843this respect.)
871usage: (defvar SYMBOL &optional INITVALUE DOCSTRING) */) 844usage: (defvar SYMBOL &optional INITVALUE DOCSTRING) */)
872 (args) 845 (Lisp_Object args)
873 Lisp_Object args;
874{ 846{
875 register Lisp_Object sym, tem, tail; 847 register Lisp_Object sym, tem, tail;
876 848
@@ -945,8 +917,7 @@ If SYMBOL has a local binding, then this form sets the local binding's
945value. However, you should normally not make local bindings for 917value. However, you should normally not make local bindings for
946variables defined with this form. 918variables defined with this form.
947usage: (defconst SYMBOL INITVALUE [DOCSTRING]) */) 919usage: (defconst SYMBOL INITVALUE [DOCSTRING]) */)
948 (args) 920 (Lisp_Object args)
949 Lisp_Object args;
950{ 921{
951 register Lisp_Object sym, tem; 922 register Lisp_Object sym, tem;
952 923
@@ -973,8 +944,7 @@ usage: (defconst SYMBOL INITVALUE [DOCSTRING]) */)
973 944
974/* Error handler used in Fuser_variable_p. */ 945/* Error handler used in Fuser_variable_p. */
975static Lisp_Object 946static Lisp_Object
976user_variable_p_eh (ignore) 947user_variable_p_eh (Lisp_Object ignore)
977 Lisp_Object ignore;
978{ 948{
979 return Qnil; 949 return Qnil;
980} 950}
@@ -996,8 +966,7 @@ A variable is a user variable if
996\(3) it is an alias for another user variable. 966\(3) it is an alias for another user variable.
997Return nil if VARIABLE is an alias and there is a loop in the 967Return nil if VARIABLE is an alias and there is a loop in the
998chain of symbols. */) 968chain of symbols. */)
999 (variable) 969 (Lisp_Object variable)
1000 Lisp_Object variable;
1001{ 970{
1002 Lisp_Object documentation; 971 Lisp_Object documentation;
1003 972
@@ -1007,30 +976,30 @@ chain of symbols. */)
1007 /* If indirect and there's an alias loop, don't check anything else. */ 976 /* If indirect and there's an alias loop, don't check anything else. */
1008 if (XSYMBOL (variable)->redirect == SYMBOL_VARALIAS 977 if (XSYMBOL (variable)->redirect == SYMBOL_VARALIAS
1009 && NILP (internal_condition_case_1 (lisp_indirect_variable, variable, 978 && NILP (internal_condition_case_1 (lisp_indirect_variable, variable,
1010 Qt, user_variable_p_eh))) 979 Qt, user_variable_p_eh)))
1011 return Qnil; 980 return Qnil;
1012 981
1013 while (1) 982 while (1)
1014 { 983 {
1015 documentation = Fget (variable, Qvariable_documentation); 984 documentation = Fget (variable, Qvariable_documentation);
1016 if (INTEGERP (documentation) && XINT (documentation) < 0) 985 if (INTEGERP (documentation) && XINT (documentation) < 0)
1017 return Qt; 986 return Qt;
1018 if (STRINGP (documentation) 987 if (STRINGP (documentation)
1019 && ((unsigned char) SREF (documentation, 0) == '*')) 988 && ((unsigned char) SREF (documentation, 0) == '*'))
1020 return Qt; 989 return Qt;
1021 /* If it is (STRING . INTEGER), a negative integer means a user variable. */ 990 /* If it is (STRING . INTEGER), a negative integer means a user variable. */
1022 if (CONSP (documentation) 991 if (CONSP (documentation)
1023 && STRINGP (XCAR (documentation)) 992 && STRINGP (XCAR (documentation))
1024 && INTEGERP (XCDR (documentation)) 993 && INTEGERP (XCDR (documentation))
1025 && XINT (XCDR (documentation)) < 0) 994 && XINT (XCDR (documentation)) < 0)
1026 return Qt; 995 return Qt;
1027 /* Customizable? See `custom-variable-p'. */ 996 /* Customizable? See `custom-variable-p'. */
1028 if ((!NILP (Fget (variable, intern ("standard-value")))) 997 if ((!NILP (Fget (variable, intern ("standard-value"))))
1029 || (!NILP (Fget (variable, intern ("custom-autoload"))))) 998 || (!NILP (Fget (variable, intern ("custom-autoload")))))
1030 return Qt; 999 return Qt;
1031 1000
1032 if (!(XSYMBOL (variable)->redirect == SYMBOL_VARALIAS)) 1001 if (!(XSYMBOL (variable)->redirect == SYMBOL_VARALIAS))
1033 return Qnil; 1002 return Qnil;
1034 1003
1035 /* An indirect variable? Let's follow the chain. */ 1004 /* An indirect variable? Let's follow the chain. */
1036 XSETSYMBOL (variable, SYMBOL_ALIAS (XSYMBOL (variable))); 1005 XSETSYMBOL (variable, SYMBOL_ALIAS (XSYMBOL (variable)));
@@ -1044,8 +1013,7 @@ Each element of VARLIST is a symbol (which is bound to nil)
1044or a list (SYMBOL VALUEFORM) (which binds SYMBOL to the value of VALUEFORM). 1013or a list (SYMBOL VALUEFORM) (which binds SYMBOL to the value of VALUEFORM).
1045Each VALUEFORM can refer to the symbols already bound by this VARLIST. 1014Each VALUEFORM can refer to the symbols already bound by this VARLIST.
1046usage: (let* VARLIST BODY...) */) 1015usage: (let* VARLIST BODY...) */)
1047 (args) 1016 (Lisp_Object args)
1048 Lisp_Object args;
1049{ 1017{
1050 Lisp_Object varlist, var, val, elt, lexenv; 1018 Lisp_Object varlist, var, val, elt, lexenv;
1051 int count = SPECPDL_INDEX (); 1019 int count = SPECPDL_INDEX ();
@@ -1101,8 +1069,7 @@ Each element of VARLIST is a symbol (which is bound to nil)
1101or a list (SYMBOL VALUEFORM) (which binds SYMBOL to the value of VALUEFORM). 1069or a list (SYMBOL VALUEFORM) (which binds SYMBOL to the value of VALUEFORM).
1102All the VALUEFORMs are evalled before any symbols are bound. 1070All the VALUEFORMs are evalled before any symbols are bound.
1103usage: (let VARLIST BODY...) */) 1071usage: (let VARLIST BODY...) */)
1104 (args) 1072 (Lisp_Object args)
1105 Lisp_Object args;
1106{ 1073{
1107 Lisp_Object *temps, tem, lexenv; 1074 Lisp_Object *temps, tem, lexenv;
1108 register Lisp_Object elt, varlist; 1075 register Lisp_Object elt, varlist;
@@ -1168,8 +1135,7 @@ DEFUN ("while", Fwhile, Swhile, 1, UNEVALLED, 0,
1168The order of execution is thus TEST, BODY, TEST, BODY and so on 1135The order of execution is thus TEST, BODY, TEST, BODY and so on
1169until TEST returns nil. 1136until TEST returns nil.
1170usage: (while TEST BODY...) */) 1137usage: (while TEST BODY...) */)
1171 (args) 1138 (Lisp_Object args)
1172 Lisp_Object args;
1173{ 1139{
1174 Lisp_Object test, body; 1140 Lisp_Object test, body;
1175 struct gcpro gcpro1, gcpro2; 1141 struct gcpro gcpro1, gcpro2;
@@ -1196,9 +1162,7 @@ in place of FORM. When a non-macro-call results, it is returned.
1196 1162
1197The second optional arg ENVIRONMENT specifies an environment of macro 1163The second optional arg ENVIRONMENT specifies an environment of macro
1198definitions to shadow the loaded ones for use in file byte-compilation. */) 1164definitions to shadow the loaded ones for use in file byte-compilation. */)
1199 (form, environment) 1165 (Lisp_Object form, Lisp_Object environment)
1200 Lisp_Object form;
1201 Lisp_Object environment;
1202{ 1166{
1203 /* With cleanups from Hallvard Furuseth. */ 1167 /* With cleanups from Hallvard Furuseth. */
1204 register Lisp_Object expander, sym, def, tem; 1168 register Lisp_Object expander, sym, def, tem;
@@ -1276,8 +1240,7 @@ Within BODY, a call to `throw' with the same TAG exits BODY and this `catch'.
1276If no throw happens, `catch' returns the value of the last BODY form. 1240If no throw happens, `catch' returns the value of the last BODY form.
1277If a throw happens, it specifies the value to return from `catch'. 1241If a throw happens, it specifies the value to return from `catch'.
1278usage: (catch TAG BODY...) */) 1242usage: (catch TAG BODY...) */)
1279 (args) 1243 (Lisp_Object args)
1280 Lisp_Object args;
1281{ 1244{
1282 register Lisp_Object tag; 1245 register Lisp_Object tag;
1283 struct gcpro gcpro1; 1246 struct gcpro gcpro1;
@@ -1293,10 +1256,7 @@ usage: (catch TAG BODY...) */)
1293 This is how catches are done from within C code. */ 1256 This is how catches are done from within C code. */
1294 1257
1295Lisp_Object 1258Lisp_Object
1296internal_catch (tag, func, arg) 1259internal_catch (Lisp_Object tag, Lisp_Object (*func) (Lisp_Object), Lisp_Object arg)
1297 Lisp_Object tag;
1298 Lisp_Object (*func) ();
1299 Lisp_Object arg;
1300{ 1260{
1301 /* This structure is made part of the chain `catchlist'. */ 1261 /* This structure is made part of the chain `catchlist'. */
1302 struct catchtag c; 1262 struct catchtag c;
@@ -1341,9 +1301,7 @@ internal_catch (tag, func, arg)
1341 This is used for correct unwinding in Fthrow and Fsignal. */ 1301 This is used for correct unwinding in Fthrow and Fsignal. */
1342 1302
1343static void 1303static void
1344unwind_to_catch (catch, value) 1304unwind_to_catch (struct catchtag *catch, Lisp_Object value)
1345 struct catchtag *catch;
1346 Lisp_Object value;
1347{ 1305{
1348 register int last_time; 1306 register int last_time;
1349 1307
@@ -1361,7 +1319,7 @@ unwind_to_catch (catch, value)
1361 last_time = catchlist == catch; 1319 last_time = catchlist == catch;
1362 1320
1363 /* Unwind the specpdl stack, and then restore the proper set of 1321 /* Unwind the specpdl stack, and then restore the proper set of
1364 handlers. */ 1322 handlers. */
1365 unbind_to (catchlist->pdlcount, Qnil); 1323 unbind_to (catchlist->pdlcount, Qnil);
1366 handlerlist = catchlist->handlerlist; 1324 handlerlist = catchlist->handlerlist;
1367 catchlist = catchlist->next; 1325 catchlist = catchlist->next;
@@ -1372,8 +1330,8 @@ unwind_to_catch (catch, value)
1372 /* If x_catch_errors was done, turn it off now. 1330 /* If x_catch_errors was done, turn it off now.
1373 (First we give unbind_to a chance to do that.) */ 1331 (First we give unbind_to a chance to do that.) */
1374#if 0 /* This would disable x_catch_errors after x_connection_closed. 1332#if 0 /* This would disable x_catch_errors after x_connection_closed.
1375 * The catch must remain in effect during that delicate 1333 The catch must remain in effect during that delicate
1376 * state. --lorentey */ 1334 state. --lorentey */
1377 x_fully_uncatch_errors (); 1335 x_fully_uncatch_errors ();
1378#endif 1336#endif
1379#endif 1337#endif
@@ -1395,8 +1353,7 @@ unwind_to_catch (catch, value)
1395DEFUN ("throw", Fthrow, Sthrow, 2, 2, 0, 1353DEFUN ("throw", Fthrow, Sthrow, 2, 2, 0,
1396 doc: /* Throw to the catch for TAG and return VALUE from it. 1354 doc: /* Throw to the catch for TAG and return VALUE from it.
1397Both TAG and VALUE are evalled. */) 1355Both TAG and VALUE are evalled. */)
1398 (tag, value) 1356 (register Lisp_Object tag, Lisp_Object value)
1399 register Lisp_Object tag, value;
1400{ 1357{
1401 register struct catchtag *c; 1358 register struct catchtag *c;
1402 1359
@@ -1416,8 +1373,7 @@ If BODYFORM completes normally, its value is returned
1416after executing the UNWINDFORMS. 1373after executing the UNWINDFORMS.
1417If BODYFORM exits nonlocally, the UNWINDFORMS are executed anyway. 1374If BODYFORM exits nonlocally, the UNWINDFORMS are executed anyway.
1418usage: (unwind-protect BODYFORM UNWINDFORMS...) */) 1375usage: (unwind-protect BODYFORM UNWINDFORMS...) */)
1419 (args) 1376 (Lisp_Object args)
1420 Lisp_Object args;
1421{ 1377{
1422 Lisp_Object val; 1378 Lisp_Object val;
1423 int count = SPECPDL_INDEX (); 1379 int count = SPECPDL_INDEX ();
@@ -1451,14 +1407,13 @@ instead of a single condition name. Then it handles all of them.
1451When a handler handles an error, control returns to the `condition-case' 1407When a handler handles an error, control returns to the `condition-case'
1452and it executes the handler's BODY... 1408and it executes the handler's BODY...
1453with VAR bound to (ERROR-SYMBOL . SIGNAL-DATA) from the error. 1409with VAR bound to (ERROR-SYMBOL . SIGNAL-DATA) from the error.
1454(If VAR is nil, the handler can't access that information.) 1410\(If VAR is nil, the handler can't access that information.)
1455Then the value of the last BODY form is returned from the `condition-case' 1411Then the value of the last BODY form is returned from the `condition-case'
1456expression. 1412expression.
1457 1413
1458See also the function `signal' for more info. 1414See also the function `signal' for more info.
1459usage: (condition-case VAR BODYFORM &rest HANDLERS) */) 1415usage: (condition-case VAR BODYFORM &rest HANDLERS) */)
1460 (args) 1416 (Lisp_Object args)
1461 Lisp_Object args;
1462{ 1417{
1463 register Lisp_Object bodyform, handlers; 1418 register Lisp_Object bodyform, handlers;
1464 volatile Lisp_Object var; 1419 volatile Lisp_Object var;
@@ -1474,9 +1429,8 @@ usage: (condition-case VAR BODYFORM &rest HANDLERS) */)
1474 rather than passed in a list. Used by Fbyte_code. */ 1429 rather than passed in a list. Used by Fbyte_code. */
1475 1430
1476Lisp_Object 1431Lisp_Object
1477internal_lisp_condition_case (var, bodyform, handlers) 1432internal_lisp_condition_case (volatile Lisp_Object var, Lisp_Object bodyform,
1478 volatile Lisp_Object var; 1433 Lisp_Object handlers)
1479 Lisp_Object bodyform, handlers;
1480{ 1434{
1481 Lisp_Object val; 1435 Lisp_Object val;
1482 struct catchtag c; 1436 struct catchtag c;
@@ -1508,7 +1462,7 @@ internal_lisp_condition_case (var, bodyform, handlers)
1508 if (_setjmp (c.jmp)) 1462 if (_setjmp (c.jmp))
1509 { 1463 {
1510 if (!NILP (h.var)) 1464 if (!NILP (h.var))
1511 specbind (h.var, c.val); 1465 specbind (h.var, c.val);
1512 val = Fprogn (Fcdr (h.chosen_clause)); 1466 val = Fprogn (Fcdr (h.chosen_clause));
1513 1467
1514 /* Note that this just undoes the binding of h.var; whoever 1468 /* Note that this just undoes the binding of h.var; whoever
@@ -1543,10 +1497,8 @@ internal_lisp_condition_case (var, bodyform, handlers)
1543 but allow the debugger to run if that is enabled. */ 1497 but allow the debugger to run if that is enabled. */
1544 1498
1545Lisp_Object 1499Lisp_Object
1546internal_condition_case (bfun, handlers, hfun) 1500internal_condition_case (Lisp_Object (*bfun) (void), Lisp_Object handlers,
1547 Lisp_Object (*bfun) (); 1501 Lisp_Object (*hfun) (Lisp_Object))
1548 Lisp_Object handlers;
1549 Lisp_Object (*hfun) ();
1550{ 1502{
1551 Lisp_Object val; 1503 Lisp_Object val;
1552 struct catchtag c; 1504 struct catchtag c;
@@ -1590,11 +1542,8 @@ internal_condition_case (bfun, handlers, hfun)
1590/* Like internal_condition_case but call BFUN with ARG as its argument. */ 1542/* Like internal_condition_case but call BFUN with ARG as its argument. */
1591 1543
1592Lisp_Object 1544Lisp_Object
1593internal_condition_case_1 (bfun, arg, handlers, hfun) 1545internal_condition_case_1 (Lisp_Object (*bfun) (Lisp_Object), Lisp_Object arg,
1594 Lisp_Object (*bfun) (); 1546 Lisp_Object handlers, Lisp_Object (*hfun) (Lisp_Object))
1595 Lisp_Object arg;
1596 Lisp_Object handlers;
1597 Lisp_Object (*hfun) ();
1598{ 1547{
1599 Lisp_Object val; 1548 Lisp_Object val;
1600 struct catchtag c; 1549 struct catchtag c;
@@ -1734,8 +1683,8 @@ internal_condition_case_n (Lisp_Object (*bfun) (int, Lisp_Object*),
1734} 1683}
1735 1684
1736 1685
1737static Lisp_Object find_handler_clause P_ ((Lisp_Object, Lisp_Object, 1686static Lisp_Object find_handler_clause (Lisp_Object, Lisp_Object,
1738 Lisp_Object, Lisp_Object)); 1687 Lisp_Object, Lisp_Object);
1739 1688
1740DEFUN ("signal", Fsignal, Ssignal, 2, 2, 0, 1689DEFUN ("signal", Fsignal, Ssignal, 2, 2, 0,
1741 doc: /* Signal an error. Args are ERROR-SYMBOL and associated DATA. 1690 doc: /* Signal an error. Args are ERROR-SYMBOL and associated DATA.
@@ -1751,8 +1700,7 @@ See Info anchor `(elisp)Definition of signal' for some details on how this
1751error message is constructed. 1700error message is constructed.
1752If the signal is handled, DATA is made available to the handler. 1701If the signal is handled, DATA is made available to the handler.
1753See also the function `condition-case'. */) 1702See also the function `condition-case'. */)
1754 (error_symbol, data) 1703 (Lisp_Object error_symbol, Lisp_Object data)
1755 Lisp_Object error_symbol, data;
1756{ 1704{
1757 /* When memory is full, ERROR-SYMBOL is nil, 1705 /* When memory is full, ERROR-SYMBOL is nil,
1758 and DATA is (REAL-ERROR-SYMBOL . REAL-DATA). 1706 and DATA is (REAL-ERROR-SYMBOL . REAL-DATA).
@@ -1864,8 +1812,7 @@ See also the function `condition-case'. */)
1864 Used for anything but Qquit (which can return from Fsignal). */ 1812 Used for anything but Qquit (which can return from Fsignal). */
1865 1813
1866void 1814void
1867xsignal (error_symbol, data) 1815xsignal (Lisp_Object error_symbol, Lisp_Object data)
1868 Lisp_Object error_symbol, data;
1869{ 1816{
1870 Fsignal (error_symbol, data); 1817 Fsignal (error_symbol, data);
1871 abort (); 1818 abort ();
@@ -1874,29 +1821,25 @@ xsignal (error_symbol, data)
1874/* Like xsignal, but takes 0, 1, 2, or 3 args instead of a list. */ 1821/* Like xsignal, but takes 0, 1, 2, or 3 args instead of a list. */
1875 1822
1876void 1823void
1877xsignal0 (error_symbol) 1824xsignal0 (Lisp_Object error_symbol)
1878 Lisp_Object error_symbol;
1879{ 1825{
1880 xsignal (error_symbol, Qnil); 1826 xsignal (error_symbol, Qnil);
1881} 1827}
1882 1828
1883void 1829void
1884xsignal1 (error_symbol, arg) 1830xsignal1 (Lisp_Object error_symbol, Lisp_Object arg)
1885 Lisp_Object error_symbol, arg;
1886{ 1831{
1887 xsignal (error_symbol, list1 (arg)); 1832 xsignal (error_symbol, list1 (arg));
1888} 1833}
1889 1834
1890void 1835void
1891xsignal2 (error_symbol, arg1, arg2) 1836xsignal2 (Lisp_Object error_symbol, Lisp_Object arg1, Lisp_Object arg2)
1892 Lisp_Object error_symbol, arg1, arg2;
1893{ 1837{
1894 xsignal (error_symbol, list2 (arg1, arg2)); 1838 xsignal (error_symbol, list2 (arg1, arg2));
1895} 1839}
1896 1840
1897void 1841void
1898xsignal3 (error_symbol, arg1, arg2, arg3) 1842xsignal3 (Lisp_Object error_symbol, Lisp_Object arg1, Lisp_Object arg2, Lisp_Object arg3)
1899 Lisp_Object error_symbol, arg1, arg2, arg3;
1900{ 1843{
1901 xsignal (error_symbol, list3 (arg1, arg2, arg3)); 1844 xsignal (error_symbol, list3 (arg1, arg2, arg3));
1902} 1845}
@@ -1905,9 +1848,7 @@ xsignal3 (error_symbol, arg1, arg2, arg3)
1905 If ARG is not a genuine list, make it a one-element list. */ 1848 If ARG is not a genuine list, make it a one-element list. */
1906 1849
1907void 1850void
1908signal_error (s, arg) 1851signal_error (const char *s, Lisp_Object arg)
1909 char *s;
1910 Lisp_Object arg;
1911{ 1852{
1912 Lisp_Object tortoise, hare; 1853 Lisp_Object tortoise, hare;
1913 1854
@@ -1936,8 +1877,7 @@ signal_error (s, arg)
1936 a list containing one of CONDITIONS. */ 1877 a list containing one of CONDITIONS. */
1937 1878
1938static int 1879static int
1939wants_debugger (list, conditions) 1880wants_debugger (Lisp_Object list, Lisp_Object conditions)
1940 Lisp_Object list, conditions;
1941{ 1881{
1942 if (NILP (list)) 1882 if (NILP (list))
1943 return 0; 1883 return 0;
@@ -1961,8 +1901,7 @@ wants_debugger (list, conditions)
1961 according to debugger-ignored-errors. */ 1901 according to debugger-ignored-errors. */
1962 1902
1963static int 1903static int
1964skip_debugger (conditions, data) 1904skip_debugger (Lisp_Object conditions, Lisp_Object data)
1965 Lisp_Object conditions, data;
1966{ 1905{
1967 Lisp_Object tail; 1906 Lisp_Object tail;
1968 int first_string = 1; 1907 int first_string = 1;
@@ -1999,8 +1938,7 @@ skip_debugger (conditions, data)
1999 SIG and DATA describe the signal, as in find_handler_clause. */ 1938 SIG and DATA describe the signal, as in find_handler_clause. */
2000 1939
2001static int 1940static int
2002maybe_call_debugger (conditions, sig, data) 1941maybe_call_debugger (Lisp_Object conditions, Lisp_Object sig, Lisp_Object data)
2003 Lisp_Object conditions, sig, data;
2004{ 1942{
2005 Lisp_Object combined_data; 1943 Lisp_Object combined_data;
2006 1944
@@ -2036,8 +1974,8 @@ maybe_call_debugger (conditions, sig, data)
2036 a second error here in case we're handling specpdl overflow. */ 1974 a second error here in case we're handling specpdl overflow. */
2037 1975
2038static Lisp_Object 1976static Lisp_Object
2039find_handler_clause (handlers, conditions, sig, data) 1977find_handler_clause (Lisp_Object handlers, Lisp_Object conditions,
2040 Lisp_Object handlers, conditions, sig, data; 1978 Lisp_Object sig, Lisp_Object data)
2041{ 1979{
2042 register Lisp_Object h; 1980 register Lisp_Object h;
2043 register Lisp_Object tem; 1981 register Lisp_Object tem;
@@ -2126,13 +2064,10 @@ find_handler_clause (handlers, conditions, sig, data)
2126 return Qnil; 2064 return Qnil;
2127} 2065}
2128 2066
2129/* dump an error message; called like printf */
2130 2067
2131/* VARARGS 1 */ 2068/* dump an error message; called like vprintf */
2132void 2069void
2133error (m, a1, a2, a3) 2070verror (const char *m, va_list ap)
2134 char *m;
2135 char *a1, *a2, *a3;
2136{ 2071{
2137 char buf[200]; 2072 char buf[200];
2138 int size = 200; 2073 int size = 200;
@@ -2142,15 +2077,12 @@ error (m, a1, a2, a3)
2142 int allocated = 0; 2077 int allocated = 0;
2143 Lisp_Object string; 2078 Lisp_Object string;
2144 2079
2145 args[0] = a1;
2146 args[1] = a2;
2147 args[2] = a3;
2148
2149 mlen = strlen (m); 2080 mlen = strlen (m);
2150 2081
2151 while (1) 2082 while (1)
2152 { 2083 {
2153 int used = doprnt (buffer, size, m, m + mlen, 3, args); 2084 int used;
2085 used = doprnt (buffer, size, m, m + mlen, ap);
2154 if (used < size) 2086 if (used < size)
2155 break; 2087 break;
2156 size *= 2; 2088 size *= 2;
@@ -2169,6 +2101,19 @@ error (m, a1, a2, a3)
2169 2101
2170 xsignal1 (Qerror, string); 2102 xsignal1 (Qerror, string);
2171} 2103}
2104
2105
2106/* dump an error message; called like printf */
2107
2108/* VARARGS 1 */
2109void
2110error (const char *m, ...)
2111{
2112 va_list ap;
2113 va_start (ap, m);
2114 verror (m, ap);
2115 va_end (ap);
2116}
2172 2117
2173DEFUN ("commandp", Fcommandp, Scommandp, 1, 2, 0, 2118DEFUN ("commandp", Fcommandp, Scommandp, 1, 2, 0,
2174 doc: /* Non-nil if FUNCTION makes provisions for interactive calling. 2119 doc: /* Non-nil if FUNCTION makes provisions for interactive calling.
@@ -2185,8 +2130,7 @@ Also, a symbol satisfies `commandp' if its function definition does so.
2185 2130
2186If the optional argument FOR-CALL-INTERACTIVELY is non-nil, 2131If the optional argument FOR-CALL-INTERACTIVELY is non-nil,
2187then strings and vectors are not accepted. */) 2132then strings and vectors are not accepted. */)
2188 (function, for_call_interactively) 2133 (Lisp_Object function, Lisp_Object for_call_interactively)
2189 Lisp_Object function, for_call_interactively;
2190{ 2134{
2191 register Lisp_Object fun; 2135 register Lisp_Object fun;
2192 register Lisp_Object funcar; 2136 register Lisp_Object funcar;
@@ -2250,8 +2194,7 @@ Third through fifth args give info about the real definition.
2250They default to nil. 2194They default to nil.
2251If FUNCTION is already defined other than as an autoload, 2195If FUNCTION is already defined other than as an autoload,
2252this does nothing and returns nil. */) 2196this does nothing and returns nil. */)
2253 (function, file, docstring, interactive, type) 2197 (Lisp_Object function, Lisp_Object file, Lisp_Object docstring, Lisp_Object interactive, Lisp_Object type)
2254 Lisp_Object function, file, docstring, interactive, type;
2255{ 2198{
2256 CHECK_SYMBOL (function); 2199 CHECK_SYMBOL (function);
2257 CHECK_STRING (file); 2200 CHECK_STRING (file);
@@ -2279,8 +2222,7 @@ this does nothing and returns nil. */)
2279} 2222}
2280 2223
2281Lisp_Object 2224Lisp_Object
2282un_autoload (oldqueue) 2225un_autoload (Lisp_Object oldqueue)
2283 Lisp_Object oldqueue;
2284{ 2226{
2285 register Lisp_Object queue, first, second; 2227 register Lisp_Object queue, first, second;
2286 2228
@@ -2307,8 +2249,7 @@ un_autoload (oldqueue)
2307 FUNDEF is the autoload definition (a list). */ 2249 FUNDEF is the autoload definition (a list). */
2308 2250
2309void 2251void
2310do_autoload (fundef, funname) 2252do_autoload (Lisp_Object fundef, Lisp_Object funname)
2311 Lisp_Object fundef, funname;
2312{ 2253{
2313 int count = SPECPDL_INDEX (); 2254 int count = SPECPDL_INDEX ();
2314 Lisp_Object fun; 2255 Lisp_Object fun;
@@ -2333,7 +2274,7 @@ do_autoload (fundef, funname)
2333 the function. We do this in the specific case of autoloading 2274 the function. We do this in the specific case of autoloading
2334 because autoloading is not an explicit request "load this file", 2275 because autoloading is not an explicit request "load this file",
2335 but rather a request to "call this function". 2276 but rather a request to "call this function".
2336 2277
2337 The value saved here is to be restored into Vautoload_queue. */ 2278 The value saved here is to be restored into Vautoload_queue. */
2338 record_unwind_protect (un_autoload, Vautoload_queue); 2279 record_unwind_protect (un_autoload, Vautoload_queue);
2339 Vautoload_queue = Qt; 2280 Vautoload_queue = Qt;
@@ -2354,8 +2295,7 @@ do_autoload (fundef, funname)
2354 2295
2355DEFUN ("eval", Feval, Seval, 1, 1, 0, 2296DEFUN ("eval", Feval, Seval, 1, 1, 0,
2356 doc: /* Evaluate FORM and return its value. */) 2297 doc: /* Evaluate FORM and return its value. */)
2357 (form) 2298 (Lisp_Object form)
2358 Lisp_Object form;
2359{ 2299{
2360 Lisp_Object fun, val, original_fun, original_args; 2300 Lisp_Object fun, val, original_fun, original_args;
2361 Lisp_Object funcar; 2301 Lisp_Object funcar;
@@ -2453,7 +2393,7 @@ DEFUN ("eval", Feval, Seval, 1, 1, 0,
2453 if (XSUBR (fun)->max_args == UNEVALLED) 2393 if (XSUBR (fun)->max_args == UNEVALLED)
2454 { 2394 {
2455 backtrace.evalargs = 0; 2395 backtrace.evalargs = 0;
2456 val = (*XSUBR (fun)->function) (args_left); 2396 val = (XSUBR (fun)->function.aUNEVALLED) (args_left);
2457 goto done; 2397 goto done;
2458 } 2398 }
2459 2399
@@ -2479,7 +2419,7 @@ DEFUN ("eval", Feval, Seval, 1, 1, 0,
2479 backtrace.args = vals; 2419 backtrace.args = vals;
2480 backtrace.nargs = XINT (numargs); 2420 backtrace.nargs = XINT (numargs);
2481 2421
2482 val = (*XSUBR (fun)->function) (XINT (numargs), vals); 2422 val = (XSUBR (fun)->function.aMANY) (XINT (numargs), vals);
2483 UNGCPRO; 2423 UNGCPRO;
2484 goto done; 2424 goto done;
2485 } 2425 }
@@ -2503,40 +2443,40 @@ DEFUN ("eval", Feval, Seval, 1, 1, 0,
2503 switch (i) 2443 switch (i)
2504 { 2444 {
2505 case 0: 2445 case 0:
2506 val = (*XSUBR (fun)->function) (); 2446 val = (XSUBR (fun)->function.a0) ();
2507 goto done; 2447 goto done;
2508 case 1: 2448 case 1:
2509 val = (*XSUBR (fun)->function) (argvals[0]); 2449 val = (XSUBR (fun)->function.a1) (argvals[0]);
2510 goto done; 2450 goto done;
2511 case 2: 2451 case 2:
2512 val = (*XSUBR (fun)->function) (argvals[0], argvals[1]); 2452 val = (XSUBR (fun)->function.a2) (argvals[0], argvals[1]);
2513 goto done; 2453 goto done;
2514 case 3: 2454 case 3:
2515 val = (*XSUBR (fun)->function) (argvals[0], argvals[1], 2455 val = (XSUBR (fun)->function.a3) (argvals[0], argvals[1],
2516 argvals[2]); 2456 argvals[2]);
2517 goto done; 2457 goto done;
2518 case 4: 2458 case 4:
2519 val = (*XSUBR (fun)->function) (argvals[0], argvals[1], 2459 val = (XSUBR (fun)->function.a4) (argvals[0], argvals[1],
2520 argvals[2], argvals[3]); 2460 argvals[2], argvals[3]);
2521 goto done; 2461 goto done;
2522 case 5: 2462 case 5:
2523 val = (*XSUBR (fun)->function) (argvals[0], argvals[1], argvals[2], 2463 val = (XSUBR (fun)->function.a5) (argvals[0], argvals[1], argvals[2],
2524 argvals[3], argvals[4]); 2464 argvals[3], argvals[4]);
2525 goto done; 2465 goto done;
2526 case 6: 2466 case 6:
2527 val = (*XSUBR (fun)->function) (argvals[0], argvals[1], argvals[2], 2467 val = (XSUBR (fun)->function.a6) (argvals[0], argvals[1], argvals[2],
2528 argvals[3], argvals[4], argvals[5]); 2468 argvals[3], argvals[4], argvals[5]);
2529 goto done; 2469 goto done;
2530 case 7: 2470 case 7:
2531 val = (*XSUBR (fun)->function) (argvals[0], argvals[1], argvals[2], 2471 val = (XSUBR (fun)->function.a7) (argvals[0], argvals[1], argvals[2],
2532 argvals[3], argvals[4], argvals[5], 2472 argvals[3], argvals[4], argvals[5],
2533 argvals[6]); 2473 argvals[6]);
2534 goto done; 2474 goto done;
2535 2475
2536 case 8: 2476 case 8:
2537 val = (*XSUBR (fun)->function) (argvals[0], argvals[1], argvals[2], 2477 val = (XSUBR (fun)->function.a8) (argvals[0], argvals[1], argvals[2],
2538 argvals[3], argvals[4], argvals[5], 2478 argvals[3], argvals[4], argvals[5],
2539 argvals[6], argvals[7]); 2479 argvals[6], argvals[7]);
2540 goto done; 2480 goto done;
2541 2481
2542 default: 2482 default:
@@ -2597,9 +2537,7 @@ DEFUN ("apply", Fapply, Sapply, 2, MANY, 0,
2597Then return the value FUNCTION returns. 2537Then return the value FUNCTION returns.
2598Thus, (apply '+ 1 2 '(3 4)) returns 10. 2538Thus, (apply '+ 1 2 '(3 4)) returns 10.
2599usage: (apply FUNCTION &rest ARGUMENTS) */) 2539usage: (apply FUNCTION &rest ARGUMENTS) */)
2600 (nargs, args) 2540 (int nargs, Lisp_Object *args)
2601 int nargs;
2602 Lisp_Object *args;
2603{ 2541{
2604 register int i, numargs; 2542 register int i, numargs;
2605 register Lisp_Object spread_arg; 2543 register Lisp_Object spread_arg;
@@ -2663,7 +2601,7 @@ usage: (apply FUNCTION &rest ARGUMENTS) */)
2663 gcpro1.nvars = 1 + numargs; 2601 gcpro1.nvars = 1 + numargs;
2664 } 2602 }
2665 2603
2666 bcopy (args, funcall_args, nargs * sizeof (Lisp_Object)); 2604 memcpy (funcall_args, args, nargs * sizeof (Lisp_Object));
2667 /* Spread the last arg we got. Its first element goes in 2605 /* Spread the last arg we got. Its first element goes in
2668 the slot that it used to occupy, hence this value of I. */ 2606 the slot that it used to occupy, hence this value of I. */
2669 i = nargs - 1; 2607 i = nargs - 1;
@@ -2680,8 +2618,8 @@ usage: (apply FUNCTION &rest ARGUMENTS) */)
2680/* Run hook variables in various ways. */ 2618/* Run hook variables in various ways. */
2681 2619
2682enum run_hooks_condition {to_completion, until_success, until_failure}; 2620enum run_hooks_condition {to_completion, until_success, until_failure};
2683static Lisp_Object run_hook_with_args P_ ((int, Lisp_Object *, 2621static Lisp_Object run_hook_with_args (int, Lisp_Object *,
2684 enum run_hooks_condition)); 2622 enum run_hooks_condition);
2685 2623
2686DEFUN ("run-hooks", Frun_hooks, Srun_hooks, 0, MANY, 0, 2624DEFUN ("run-hooks", Frun_hooks, Srun_hooks, 0, MANY, 0,
2687 doc: /* Run each hook in HOOKS. 2625 doc: /* Run each hook in HOOKS.
@@ -2698,9 +2636,7 @@ hook; they should use `run-mode-hooks' instead.
2698Do not use `make-local-variable' to make a hook variable buffer-local. 2636Do not use `make-local-variable' to make a hook variable buffer-local.
2699Instead, use `add-hook' and specify t for the LOCAL argument. 2637Instead, use `add-hook' and specify t for the LOCAL argument.
2700usage: (run-hooks &rest HOOKS) */) 2638usage: (run-hooks &rest HOOKS) */)
2701 (nargs, args) 2639 (int nargs, Lisp_Object *args)
2702 int nargs;
2703 Lisp_Object *args;
2704{ 2640{
2705 Lisp_Object hook[1]; 2641 Lisp_Object hook[1];
2706 register int i; 2642 register int i;
@@ -2729,9 +2665,7 @@ as that may change.
2729Do not use `make-local-variable' to make a hook variable buffer-local. 2665Do not use `make-local-variable' to make a hook variable buffer-local.
2730Instead, use `add-hook' and specify t for the LOCAL argument. 2666Instead, use `add-hook' and specify t for the LOCAL argument.
2731usage: (run-hook-with-args HOOK &rest ARGS) */) 2667usage: (run-hook-with-args HOOK &rest ARGS) */)
2732 (nargs, args) 2668 (int nargs, Lisp_Object *args)
2733 int nargs;
2734 Lisp_Object *args;
2735{ 2669{
2736 return run_hook_with_args (nargs, args, to_completion); 2670 return run_hook_with_args (nargs, args, to_completion);
2737} 2671}
@@ -2751,9 +2685,7 @@ However, if they all return nil, we return nil.
2751Do not use `make-local-variable' to make a hook variable buffer-local. 2685Do not use `make-local-variable' to make a hook variable buffer-local.
2752Instead, use `add-hook' and specify t for the LOCAL argument. 2686Instead, use `add-hook' and specify t for the LOCAL argument.
2753usage: (run-hook-with-args-until-success HOOK &rest ARGS) */) 2687usage: (run-hook-with-args-until-success HOOK &rest ARGS) */)
2754 (nargs, args) 2688 (int nargs, Lisp_Object *args)
2755 int nargs;
2756 Lisp_Object *args;
2757{ 2689{
2758 return run_hook_with_args (nargs, args, until_success); 2690 return run_hook_with_args (nargs, args, until_success);
2759} 2691}
@@ -2772,9 +2704,7 @@ Then we return nil. However, if they all return non-nil, we return non-nil.
2772Do not use `make-local-variable' to make a hook variable buffer-local. 2704Do not use `make-local-variable' to make a hook variable buffer-local.
2773Instead, use `add-hook' and specify t for the LOCAL argument. 2705Instead, use `add-hook' and specify t for the LOCAL argument.
2774usage: (run-hook-with-args-until-failure HOOK &rest ARGS) */) 2706usage: (run-hook-with-args-until-failure HOOK &rest ARGS) */)
2775 (nargs, args) 2707 (int nargs, Lisp_Object *args)
2776 int nargs;
2777 Lisp_Object *args;
2778{ 2708{
2779 return run_hook_with_args (nargs, args, until_failure); 2709 return run_hook_with_args (nargs, args, until_failure);
2780} 2710}
@@ -2788,10 +2718,7 @@ usage: (run-hook-with-args-until-failure HOOK &rest ARGS) */)
2788 except that it isn't necessary to gcpro ARGS[0]. */ 2718 except that it isn't necessary to gcpro ARGS[0]. */
2789 2719
2790static Lisp_Object 2720static Lisp_Object
2791run_hook_with_args (nargs, args, cond) 2721run_hook_with_args (int nargs, Lisp_Object *args, enum run_hooks_condition cond)
2792 int nargs;
2793 Lisp_Object *args;
2794 enum run_hooks_condition cond;
2795{ 2722{
2796 Lisp_Object sym, val, ret; 2723 Lisp_Object sym, val, ret;
2797 struct gcpro gcpro1, gcpro2, gcpro3; 2724 struct gcpro gcpro1, gcpro2, gcpro3;
@@ -2871,10 +2798,7 @@ run_hook_with_args (nargs, args, cond)
2871 except that it isn't necessary to gcpro ARGS[0]. */ 2798 except that it isn't necessary to gcpro ARGS[0]. */
2872 2799
2873Lisp_Object 2800Lisp_Object
2874run_hook_list_with_args (funlist, nargs, args) 2801run_hook_list_with_args (Lisp_Object funlist, int nargs, Lisp_Object *args)
2875 Lisp_Object funlist;
2876 int nargs;
2877 Lisp_Object *args;
2878{ 2802{
2879 Lisp_Object sym; 2803 Lisp_Object sym;
2880 Lisp_Object val; 2804 Lisp_Object val;
@@ -2916,8 +2840,7 @@ run_hook_list_with_args (funlist, nargs, args)
2916/* Run the hook HOOK, giving each function the two args ARG1 and ARG2. */ 2840/* Run the hook HOOK, giving each function the two args ARG1 and ARG2. */
2917 2841
2918void 2842void
2919run_hook_with_args_2 (hook, arg1, arg2) 2843run_hook_with_args_2 (Lisp_Object hook, Lisp_Object arg1, Lisp_Object arg2)
2920 Lisp_Object hook, arg1, arg2;
2921{ 2844{
2922 Lisp_Object temp[3]; 2845 Lisp_Object temp[3];
2923 temp[0] = hook; 2846 temp[0] = hook;
@@ -2929,8 +2852,7 @@ run_hook_with_args_2 (hook, arg1, arg2)
2929 2852
2930/* Apply fn to arg */ 2853/* Apply fn to arg */
2931Lisp_Object 2854Lisp_Object
2932apply1 (fn, arg) 2855apply1 (Lisp_Object fn, Lisp_Object arg)
2933 Lisp_Object fn, arg;
2934{ 2856{
2935 struct gcpro gcpro1; 2857 struct gcpro gcpro1;
2936 2858
@@ -2949,8 +2871,7 @@ apply1 (fn, arg)
2949 2871
2950/* Call function fn on no arguments */ 2872/* Call function fn on no arguments */
2951Lisp_Object 2873Lisp_Object
2952call0 (fn) 2874call0 (Lisp_Object fn)
2953 Lisp_Object fn;
2954{ 2875{
2955 struct gcpro gcpro1; 2876 struct gcpro gcpro1;
2956 2877
@@ -2961,8 +2882,7 @@ call0 (fn)
2961/* Call function fn with 1 argument arg1 */ 2882/* Call function fn with 1 argument arg1 */
2962/* ARGSUSED */ 2883/* ARGSUSED */
2963Lisp_Object 2884Lisp_Object
2964call1 (fn, arg1) 2885call1 (Lisp_Object fn, Lisp_Object arg1)
2965 Lisp_Object fn, arg1;
2966{ 2886{
2967 struct gcpro gcpro1; 2887 struct gcpro gcpro1;
2968 Lisp_Object args[2]; 2888 Lisp_Object args[2];
@@ -2977,8 +2897,7 @@ call1 (fn, arg1)
2977/* Call function fn with 2 arguments arg1, arg2 */ 2897/* Call function fn with 2 arguments arg1, arg2 */
2978/* ARGSUSED */ 2898/* ARGSUSED */
2979Lisp_Object 2899Lisp_Object
2980call2 (fn, arg1, arg2) 2900call2 (Lisp_Object fn, Lisp_Object arg1, Lisp_Object arg2)
2981 Lisp_Object fn, arg1, arg2;
2982{ 2901{
2983 struct gcpro gcpro1; 2902 struct gcpro gcpro1;
2984 Lisp_Object args[3]; 2903 Lisp_Object args[3];
@@ -2993,8 +2912,7 @@ call2 (fn, arg1, arg2)
2993/* Call function fn with 3 arguments arg1, arg2, arg3 */ 2912/* Call function fn with 3 arguments arg1, arg2, arg3 */
2994/* ARGSUSED */ 2913/* ARGSUSED */
2995Lisp_Object 2914Lisp_Object
2996call3 (fn, arg1, arg2, arg3) 2915call3 (Lisp_Object fn, Lisp_Object arg1, Lisp_Object arg2, Lisp_Object arg3)
2997 Lisp_Object fn, arg1, arg2, arg3;
2998{ 2916{
2999 struct gcpro gcpro1; 2917 struct gcpro gcpro1;
3000 Lisp_Object args[4]; 2918 Lisp_Object args[4];
@@ -3010,8 +2928,8 @@ call3 (fn, arg1, arg2, arg3)
3010/* Call function fn with 4 arguments arg1, arg2, arg3, arg4 */ 2928/* Call function fn with 4 arguments arg1, arg2, arg3, arg4 */
3011/* ARGSUSED */ 2929/* ARGSUSED */
3012Lisp_Object 2930Lisp_Object
3013call4 (fn, arg1, arg2, arg3, arg4) 2931call4 (Lisp_Object fn, Lisp_Object arg1, Lisp_Object arg2, Lisp_Object arg3,
3014 Lisp_Object fn, arg1, arg2, arg3, arg4; 2932 Lisp_Object arg4)
3015{ 2933{
3016 struct gcpro gcpro1; 2934 struct gcpro gcpro1;
3017 Lisp_Object args[5]; 2935 Lisp_Object args[5];
@@ -3028,8 +2946,8 @@ call4 (fn, arg1, arg2, arg3, arg4)
3028/* Call function fn with 5 arguments arg1, arg2, arg3, arg4, arg5 */ 2946/* Call function fn with 5 arguments arg1, arg2, arg3, arg4, arg5 */
3029/* ARGSUSED */ 2947/* ARGSUSED */
3030Lisp_Object 2948Lisp_Object
3031call5 (fn, arg1, arg2, arg3, arg4, arg5) 2949call5 (Lisp_Object fn, Lisp_Object arg1, Lisp_Object arg2, Lisp_Object arg3,
3032 Lisp_Object fn, arg1, arg2, arg3, arg4, arg5; 2950 Lisp_Object arg4, Lisp_Object arg5)
3033{ 2951{
3034 struct gcpro gcpro1; 2952 struct gcpro gcpro1;
3035 Lisp_Object args[6]; 2953 Lisp_Object args[6];
@@ -3047,8 +2965,8 @@ call5 (fn, arg1, arg2, arg3, arg4, arg5)
3047/* Call function fn with 6 arguments arg1, arg2, arg3, arg4, arg5, arg6 */ 2965/* Call function fn with 6 arguments arg1, arg2, arg3, arg4, arg5, arg6 */
3048/* ARGSUSED */ 2966/* ARGSUSED */
3049Lisp_Object 2967Lisp_Object
3050call6 (fn, arg1, arg2, arg3, arg4, arg5, arg6) 2968call6 (Lisp_Object fn, Lisp_Object arg1, Lisp_Object arg2, Lisp_Object arg3,
3051 Lisp_Object fn, arg1, arg2, arg3, arg4, arg5, arg6; 2969 Lisp_Object arg4, Lisp_Object arg5, Lisp_Object arg6)
3052{ 2970{
3053 struct gcpro gcpro1; 2971 struct gcpro gcpro1;
3054 Lisp_Object args[7]; 2972 Lisp_Object args[7];
@@ -3067,8 +2985,8 @@ call6 (fn, arg1, arg2, arg3, arg4, arg5, arg6)
3067/* Call function fn with 7 arguments arg1, arg2, arg3, arg4, arg5, arg6, arg7 */ 2985/* Call function fn with 7 arguments arg1, arg2, arg3, arg4, arg5, arg6, arg7 */
3068/* ARGSUSED */ 2986/* ARGSUSED */
3069Lisp_Object 2987Lisp_Object
3070call7 (fn, arg1, arg2, arg3, arg4, arg5, arg6, arg7) 2988call7 (Lisp_Object fn, Lisp_Object arg1, Lisp_Object arg2, Lisp_Object arg3,
3071 Lisp_Object fn, arg1, arg2, arg3, arg4, arg5, arg6, arg7; 2989 Lisp_Object arg4, Lisp_Object arg5, Lisp_Object arg6, Lisp_Object arg7)
3072{ 2990{
3073 struct gcpro gcpro1; 2991 struct gcpro gcpro1;
3074 Lisp_Object args[8]; 2992 Lisp_Object args[8];
@@ -3126,9 +3044,7 @@ DEFUN ("funcall", Ffuncall, Sfuncall, 1, MANY, 0,
3126Return the value that function returns. 3044Return the value that function returns.
3127Thus, (funcall 'cons 'x 'y) returns (x . y). 3045Thus, (funcall 'cons 'x 'y) returns (x . y).
3128usage: (funcall FUNCTION &rest ARGUMENTS) */) 3046usage: (funcall FUNCTION &rest ARGUMENTS) */)
3129 (nargs, args) 3047 (int nargs, Lisp_Object *args)
3130 int nargs;
3131 Lisp_Object *args;
3132{ 3048{
3133 Lisp_Object fun, original_fun; 3049 Lisp_Object fun, original_fun;
3134 Lisp_Object funcar; 3050 Lisp_Object funcar;
@@ -3191,14 +3107,14 @@ usage: (funcall FUNCTION &rest ARGUMENTS) */)
3191 3107
3192 if (XSUBR (fun)->max_args == MANY) 3108 if (XSUBR (fun)->max_args == MANY)
3193 { 3109 {
3194 val = (*XSUBR (fun)->function) (numargs, args + 1); 3110 val = (XSUBR (fun)->function.aMANY) (numargs, args + 1);
3195 goto done; 3111 goto done;
3196 } 3112 }
3197 3113
3198 if (XSUBR (fun)->max_args > numargs) 3114 if (XSUBR (fun)->max_args > numargs)
3199 { 3115 {
3200 internal_args = (Lisp_Object *) alloca (XSUBR (fun)->max_args * sizeof (Lisp_Object)); 3116 internal_args = (Lisp_Object *) alloca (XSUBR (fun)->max_args * sizeof (Lisp_Object));
3201 bcopy (args + 1, internal_args, numargs * sizeof (Lisp_Object)); 3117 memcpy (internal_args, args + 1, numargs * sizeof (Lisp_Object));
3202 for (i = numargs; i < XSUBR (fun)->max_args; i++) 3118 for (i = numargs; i < XSUBR (fun)->max_args; i++)
3203 internal_args[i] = Qnil; 3119 internal_args[i] = Qnil;
3204 } 3120 }
@@ -3207,44 +3123,44 @@ usage: (funcall FUNCTION &rest ARGUMENTS) */)
3207 switch (XSUBR (fun)->max_args) 3123 switch (XSUBR (fun)->max_args)
3208 { 3124 {
3209 case 0: 3125 case 0:
3210 val = (*XSUBR (fun)->function) (); 3126 val = (XSUBR (fun)->function.a0) ();
3211 goto done; 3127 goto done;
3212 case 1: 3128 case 1:
3213 val = (*XSUBR (fun)->function) (internal_args[0]); 3129 val = (XSUBR (fun)->function.a1) (internal_args[0]);
3214 goto done; 3130 goto done;
3215 case 2: 3131 case 2:
3216 val = (*XSUBR (fun)->function) (internal_args[0], internal_args[1]); 3132 val = (XSUBR (fun)->function.a2) (internal_args[0], internal_args[1]);
3217 goto done; 3133 goto done;
3218 case 3: 3134 case 3:
3219 val = (*XSUBR (fun)->function) (internal_args[0], internal_args[1], 3135 val = (XSUBR (fun)->function.a3) (internal_args[0], internal_args[1],
3220 internal_args[2]); 3136 internal_args[2]);
3221 goto done; 3137 goto done;
3222 case 4: 3138 case 4:
3223 val = (*XSUBR (fun)->function) (internal_args[0], internal_args[1], 3139 val = (XSUBR (fun)->function.a4) (internal_args[0], internal_args[1],
3224 internal_args[2], internal_args[3]); 3140 internal_args[2], internal_args[3]);
3225 goto done; 3141 goto done;
3226 case 5: 3142 case 5:
3227 val = (*XSUBR (fun)->function) (internal_args[0], internal_args[1], 3143 val = (XSUBR (fun)->function.a5) (internal_args[0], internal_args[1],
3228 internal_args[2], internal_args[3], 3144 internal_args[2], internal_args[3],
3229 internal_args[4]); 3145 internal_args[4]);
3230 goto done; 3146 goto done;
3231 case 6: 3147 case 6:
3232 val = (*XSUBR (fun)->function) (internal_args[0], internal_args[1], 3148 val = (XSUBR (fun)->function.a6) (internal_args[0], internal_args[1],
3233 internal_args[2], internal_args[3], 3149 internal_args[2], internal_args[3],
3234 internal_args[4], internal_args[5]); 3150 internal_args[4], internal_args[5]);
3235 goto done; 3151 goto done;
3236 case 7: 3152 case 7:
3237 val = (*XSUBR (fun)->function) (internal_args[0], internal_args[1], 3153 val = (XSUBR (fun)->function.a7) (internal_args[0], internal_args[1],
3238 internal_args[2], internal_args[3], 3154 internal_args[2], internal_args[3],
3239 internal_args[4], internal_args[5], 3155 internal_args[4], internal_args[5],
3240 internal_args[6]); 3156 internal_args[6]);
3241 goto done; 3157 goto done;
3242 3158
3243 case 8: 3159 case 8:
3244 val = (*XSUBR (fun)->function) (internal_args[0], internal_args[1], 3160 val = (XSUBR (fun)->function.a8) (internal_args[0], internal_args[1],
3245 internal_args[2], internal_args[3], 3161 internal_args[2], internal_args[3],
3246 internal_args[4], internal_args[5], 3162 internal_args[4], internal_args[5],
3247 internal_args[6], internal_args[7]); 3163 internal_args[6], internal_args[7]);
3248 goto done; 3164 goto done;
3249 3165
3250 default: 3166 default:
@@ -3294,10 +3210,8 @@ usage: (funcall FUNCTION &rest ARGUMENTS) */)
3294} 3210}
3295 3211
3296Lisp_Object 3212Lisp_Object
3297apply_lambda (fun, args, eval_flag, lexenv) 3213apply_lambda (Lisp_Object fun, Lisp_Object args, int eval_flag,
3298 Lisp_Object fun, args; 3214 Lisp_Object lexenv)
3299 int eval_flag;
3300 Lisp_Object lexenv;
3301{ 3215{
3302 Lisp_Object args_left; 3216 Lisp_Object args_left;
3303 Lisp_Object numargs; 3217 Lisp_Object numargs;
@@ -3395,11 +3309,9 @@ funcall_funvec (fun, nargs, args)
3395 FUN must be either a lambda-expression or a compiled-code object. */ 3309 FUN must be either a lambda-expression or a compiled-code object. */
3396 3310
3397static Lisp_Object 3311static Lisp_Object
3398funcall_lambda (fun, nargs, arg_vector, lexenv) 3312funcall_lambda (Lisp_Object fun, int nargs,
3399 Lisp_Object fun; 3313 register Lisp_Object *arg_vector,
3400 int nargs; 3314 Lisp_Object lexenv)
3401 register Lisp_Object *arg_vector;
3402 Lisp_Object lexenv;
3403{ 3315{
3404 Lisp_Object val, syms_left, next; 3316 Lisp_Object val, syms_left, next;
3405 int count = SPECPDL_INDEX (); 3317 int count = SPECPDL_INDEX ();
@@ -3516,8 +3428,7 @@ funcall_lambda (fun, nargs, arg_vector, lexenv)
3516DEFUN ("fetch-bytecode", Ffetch_bytecode, Sfetch_bytecode, 3428DEFUN ("fetch-bytecode", Ffetch_bytecode, Sfetch_bytecode,
3517 1, 1, 0, 3429 1, 1, 0,
3518 doc: /* If byte-compiled OBJECT is lazy-loaded, fetch it now. */) 3430 doc: /* If byte-compiled OBJECT is lazy-loaded, fetch it now. */)
3519 (object) 3431 (Lisp_Object object)
3520 Lisp_Object object;
3521{ 3432{
3522 Lisp_Object tem; 3433 Lisp_Object tem;
3523 3434
@@ -3539,7 +3450,7 @@ DEFUN ("fetch-bytecode", Ffetch_bytecode, Sfetch_bytecode,
3539} 3450}
3540 3451
3541void 3452void
3542grow_specpdl () 3453grow_specpdl (void)
3543{ 3454{
3544 register int count = SPECPDL_INDEX (); 3455 register int count = SPECPDL_INDEX ();
3545 if (specpdl_size >= max_specpdl_size) 3456 if (specpdl_size >= max_specpdl_size)
@@ -3572,8 +3483,7 @@ grow_specpdl ()
3572 BUFFER did not yet have a buffer-local value). */ 3483 BUFFER did not yet have a buffer-local value). */
3573 3484
3574void 3485void
3575specbind (symbol, value) 3486specbind (Lisp_Object symbol, Lisp_Object value)
3576 Lisp_Object symbol, value;
3577{ 3487{
3578 struct Lisp_Symbol *sym; 3488 struct Lisp_Symbol *sym;
3579 3489
@@ -3590,18 +3500,17 @@ specbind (symbol, value)
3590 case SYMBOL_VARALIAS: 3500 case SYMBOL_VARALIAS:
3591 sym = indirect_variable (sym); XSETSYMBOL (symbol, sym); goto start; 3501 sym = indirect_variable (sym); XSETSYMBOL (symbol, sym); goto start;
3592 case SYMBOL_PLAINVAL: 3502 case SYMBOL_PLAINVAL:
3593 { /* The most common case is that of a non-constant symbol with a 3503 /* The most common case is that of a non-constant symbol with a
3594 trivial value. Make that as fast as we can. */ 3504 trivial value. Make that as fast as we can. */
3595 specpdl_ptr->symbol = symbol; 3505 specpdl_ptr->symbol = symbol;
3596 specpdl_ptr->old_value = SYMBOL_VAL (sym); 3506 specpdl_ptr->old_value = SYMBOL_VAL (sym);
3597 specpdl_ptr->func = NULL; 3507 specpdl_ptr->func = NULL;
3598 ++specpdl_ptr; 3508 ++specpdl_ptr;
3599 if (!sym->constant) 3509 if (!sym->constant)
3600 SET_SYMBOL_VAL (sym, value); 3510 SET_SYMBOL_VAL (sym, value);
3601 else 3511 else
3602 set_internal (symbol, value, Qnil, 1); 3512 set_internal (symbol, value, Qnil, 1);
3603 break; 3513 break;
3604 }
3605 case SYMBOL_LOCALIZED: 3514 case SYMBOL_LOCALIZED:
3606 if (SYMBOL_BLV (sym)->frame_local) 3515 if (SYMBOL_BLV (sym)->frame_local)
3607 error ("Frame-local vars cannot be let-bound"); 3516 error ("Frame-local vars cannot be let-bound");
@@ -3671,9 +3580,7 @@ specbind (symbol, value)
3671} 3580}
3672 3581
3673void 3582void
3674record_unwind_protect (function, arg) 3583record_unwind_protect (Lisp_Object (*function) (Lisp_Object), Lisp_Object arg)
3675 Lisp_Object (*function) P_ ((Lisp_Object));
3676 Lisp_Object arg;
3677{ 3584{
3678 eassert (!handling_signal); 3585 eassert (!handling_signal);
3679 3586
@@ -3686,9 +3593,7 @@ record_unwind_protect (function, arg)
3686} 3593}
3687 3594
3688Lisp_Object 3595Lisp_Object
3689unbind_to (count, value) 3596unbind_to (int count, Lisp_Object value)
3690 int count;
3691 Lisp_Object value;
3692{ 3597{
3693 Lisp_Object quitf = Vquit_flag; 3598 Lisp_Object quitf = Vquit_flag;
3694 struct gcpro gcpro1, gcpro2; 3599 struct gcpro gcpro1, gcpro2;
@@ -3715,7 +3620,7 @@ unbind_to (count, value)
3715 bound a variable that had a buffer-local or frame-local 3620 bound a variable that had a buffer-local or frame-local
3716 binding. WHERE nil means that the variable had the default 3621 binding. WHERE nil means that the variable had the default
3717 value when it was bound. CURRENT-BUFFER is the buffer that 3622 value when it was bound. CURRENT-BUFFER is the buffer that
3718 was current when the variable was bound. */ 3623 was current when the variable was bound. */
3719 else if (CONSP (this_binding.symbol)) 3624 else if (CONSP (this_binding.symbol))
3720 { 3625 {
3721 Lisp_Object symbol, where; 3626 Lisp_Object symbol, where;
@@ -3789,8 +3694,7 @@ usage: (curry FUN &rest ARGS) */)
3789DEFUN ("backtrace-debug", Fbacktrace_debug, Sbacktrace_debug, 2, 2, 0, 3694DEFUN ("backtrace-debug", Fbacktrace_debug, Sbacktrace_debug, 2, 2, 0,
3790 doc: /* Set the debug-on-exit flag of eval frame LEVEL levels down to FLAG. 3695 doc: /* Set the debug-on-exit flag of eval frame LEVEL levels down to FLAG.
3791The debugger is entered when that frame exits, if the flag is non-nil. */) 3696The debugger is entered when that frame exits, if the flag is non-nil. */)
3792 (level, flag) 3697 (Lisp_Object level, Lisp_Object flag)
3793 Lisp_Object level, flag;
3794{ 3698{
3795 register struct backtrace *backlist = backtrace_list; 3699 register struct backtrace *backlist = backtrace_list;
3796 register int i; 3700 register int i;
@@ -3811,7 +3715,7 @@ The debugger is entered when that frame exits, if the flag is non-nil. */)
3811DEFUN ("backtrace", Fbacktrace, Sbacktrace, 0, 0, "", 3715DEFUN ("backtrace", Fbacktrace, Sbacktrace, 0, 0, "",
3812 doc: /* Print a trace of Lisp function calls currently active. 3716 doc: /* Print a trace of Lisp function calls currently active.
3813Output stream used is value of `standard-output'. */) 3717Output stream used is value of `standard-output'. */)
3814 () 3718 (void)
3815{ 3719{
3816 register struct backtrace *backlist = backtrace_list; 3720 register struct backtrace *backlist = backtrace_list;
3817 register int i; 3721 register int i;
@@ -3876,8 +3780,7 @@ A &rest arg is represented as the tail of the list ARG-VALUES.
3876FUNCTION is whatever was supplied as car of evaluated list, 3780FUNCTION is whatever was supplied as car of evaluated list,
3877or a lambda expression for macro calls. 3781or a lambda expression for macro calls.
3878If NFRAMES is more than the number of frames, the value is nil. */) 3782If NFRAMES is more than the number of frames, the value is nil. */)
3879 (nframes) 3783 (Lisp_Object nframes)
3880 Lisp_Object nframes;
3881{ 3784{
3882 register struct backtrace *backlist = backtrace_list; 3785 register struct backtrace *backlist = backtrace_list;
3883 register int i; 3786 register int i;
@@ -3906,7 +3809,7 @@ If NFRAMES is more than the number of frames, the value is nil. */)
3906 3809
3907 3810
3908void 3811void
3909mark_backtrace () 3812mark_backtrace (void)
3910{ 3813{
3911 register struct backtrace *backlist; 3814 register struct backtrace *backlist;
3912 register int i; 3815 register int i;
@@ -3925,7 +3828,7 @@ mark_backtrace ()
3925} 3828}
3926 3829
3927void 3830void
3928syms_of_eval () 3831syms_of_eval (void)
3929{ 3832{
3930 DEFVAR_INT ("max-specpdl-size", &max_specpdl_size, 3833 DEFVAR_INT ("max-specpdl-size", &max_specpdl_size,
3931 doc: /* *Limit on number of Lisp variable bindings and `unwind-protect's. 3834 doc: /* *Limit on number of Lisp variable bindings and `unwind-protect's.