comparison src/eval.c @ 440:8de8e3f6228a r21-2-28

Import from CVS: tag r21-2-28
author cvs
date Mon, 13 Aug 2007 11:33:38 +0200
parents 84b14dcb0985
children abe6d1db359e
comparison
equal deleted inserted replaced
439:357dd071b03c 440:8de8e3f6228a
293 write_c_string (name, printcharfun); 293 write_c_string (name, printcharfun);
294 write_c_string (trailer, printcharfun); 294 write_c_string (trailer, printcharfun);
295 } 295 }
296 296
297 static const struct lrecord_description subr_description[] = { 297 static const struct lrecord_description subr_description[] = {
298 { XD_DOC_STRING, offsetof(Lisp_Subr, doc) }, 298 { XD_DOC_STRING, offsetof (Lisp_Subr, doc) },
299 { XD_END } 299 { XD_END }
300 }; 300 };
301 301
302 DEFINE_BASIC_LRECORD_IMPLEMENTATION ("subr", subr, 302 DEFINE_BASIC_LRECORD_IMPLEMENTATION ("subr", subr,
303 this_one_is_unmarkable, print_subr, 0, 0, 0, 303 this_one_is_unmarkable, print_subr, 0, 0, 0,
1480 /************************************************************************/ 1480 /************************************************************************/
1481 1481
1482 static Lisp_Object 1482 static Lisp_Object
1483 condition_bind_unwind (Lisp_Object loser) 1483 condition_bind_unwind (Lisp_Object loser)
1484 { 1484 {
1485 struct Lisp_Cons *victim; 1485 Lisp_Cons *victim;
1486 /* ((handler-fun . handler-args) ... other handlers) */ 1486 /* ((handler-fun . handler-args) ... other handlers) */
1487 Lisp_Object tem = XCAR (loser); 1487 Lisp_Object tem = XCAR (loser);
1488 1488
1489 while (CONSP (tem)) 1489 while (CONSP (tem))
1490 { 1490 {
1502 } 1502 }
1503 1503
1504 static Lisp_Object 1504 static Lisp_Object
1505 condition_case_unwind (Lisp_Object loser) 1505 condition_case_unwind (Lisp_Object loser)
1506 { 1506 {
1507 struct Lisp_Cons *victim; 1507 Lisp_Cons *victim;
1508 1508
1509 /* ((<unbound> . clauses) ... other handlers */ 1509 /* ((<unbound> . clauses) ... other handlers */
1510 victim = XCONS (XCAR (loser)); 1510 victim = XCONS (XCAR (loser));
1511 free_cons (victim); 1511 free_cons (victim);
1512 1512
2738 if (purify_flag) 2738 if (purify_flag)
2739 { 2739 {
2740 /* Attempt to avoid consing identical (string=) pure strings. */ 2740 /* Attempt to avoid consing identical (string=) pure strings. */
2741 file = Fsymbol_name (Fintern (file, Qnil)); 2741 file = Fsymbol_name (Fintern (file, Qnil));
2742 } 2742 }
2743 2743
2744 return Ffset (function, Fcons (Qautoload, list4 (file, 2744 return Ffset (function, Fcons (Qautoload, list4 (file,
2745 docstring, 2745 docstring,
2746 interactive, 2746 interactive,
2747 type))); 2747 type)));
2748 } 2748 }
3004 UNGCPRO; 3004 UNGCPRO;
3005 } 3005 }
3006 else 3006 else
3007 { 3007 {
3008 wrong_number_of_arguments: 3008 wrong_number_of_arguments:
3009 val = signal_wrong_number_of_arguments_error (fun, nargs); 3009 val = signal_wrong_number_of_arguments_error (original_fun, nargs);
3010 } 3010 }
3011 } 3011 }
3012 else if (COMPILED_FUNCTIONP (fun)) 3012 else if (COMPILED_FUNCTIONP (fun))
3013 { 3013 {
3014 struct gcpro gcpro1; 3014 struct gcpro gcpro1;
4461 static Lisp_Object 4461 static Lisp_Object
4462 specbind_unwind_local (Lisp_Object ovalue) 4462 specbind_unwind_local (Lisp_Object ovalue)
4463 { 4463 {
4464 Lisp_Object current = Fcurrent_buffer (); 4464 Lisp_Object current = Fcurrent_buffer ();
4465 Lisp_Object symbol = specpdl_ptr->symbol; 4465 Lisp_Object symbol = specpdl_ptr->symbol;
4466 struct Lisp_Cons *victim = XCONS (ovalue); 4466 Lisp_Cons *victim = XCONS (ovalue);
4467 Lisp_Object buf = get_buffer (victim->car, 0); 4467 Lisp_Object buf = get_buffer (victim->car, 0);
4468 ovalue = victim->cdr; 4468 ovalue = victim->cdr;
4469 4469
4470 free_cons (victim); 4470 free_cons (victim);
4471 4471
4615 (*specpdl_ptr->func) (specpdl_ptr->old_value); 4615 (*specpdl_ptr->func) (specpdl_ptr->old_value);
4616 else 4616 else
4617 { 4617 {
4618 /* We checked symbol for validity when we specbound it, 4618 /* We checked symbol for validity when we specbound it,
4619 so only need to call Fset if symbol has magic value. */ 4619 so only need to call Fset if symbol has magic value. */
4620 struct Lisp_Symbol *sym = XSYMBOL (specpdl_ptr->symbol); 4620 Lisp_Symbol *sym = XSYMBOL (specpdl_ptr->symbol);
4621 if (!SYMBOL_VALUE_MAGIC_P (sym->value)) 4621 if (!SYMBOL_VALUE_MAGIC_P (sym->value))
4622 sym->value = specpdl_ptr->old_value; 4622 sym->value = specpdl_ptr->old_value;
4623 else 4623 else
4624 Fset (specpdl_ptr->symbol, specpdl_ptr->old_value); 4624 Fset (specpdl_ptr->symbol, specpdl_ptr->old_value);
4625 } 4625 }