diff options
Diffstat (limited to 'src/data.c')
| -rw-r--r-- | src/data.c | 64 |
1 files changed, 27 insertions, 37 deletions
diff --git a/src/data.c b/src/data.c index 8cca837028d..cc15431cd16 100644 --- a/src/data.c +++ b/src/data.c | |||
| @@ -106,7 +106,7 @@ void | |||
| 106 | circular_list_error (list) | 106 | circular_list_error (list) |
| 107 | Lisp_Object list; | 107 | Lisp_Object list; |
| 108 | { | 108 | { |
| 109 | Fsignal (Qcircular_list, list); | 109 | xsignal (Qcircular_list, list); |
| 110 | } | 110 | } |
| 111 | 111 | ||
| 112 | 112 | ||
| @@ -119,16 +119,7 @@ wrong_type_argument (predicate, value) | |||
| 119 | if ((unsigned int) XGCTYPE (value) >= Lisp_Type_Limit) | 119 | if ((unsigned int) XGCTYPE (value) >= Lisp_Type_Limit) |
| 120 | abort (); | 120 | abort (); |
| 121 | 121 | ||
| 122 | Fsignal (Qwrong_type_argument, list2 (predicate, value)); | 122 | xsignal2 (Qwrong_type_argument, predicate, value); |
| 123 | |||
| 124 | /* This function is marked as NO_RETURN, gcc would warn if it has a | ||
| 125 | return statement or if falls off the function. Other compilers | ||
| 126 | warn if no return statement is present. */ | ||
| 127 | #ifndef __GNUC__ | ||
| 128 | return value; | ||
| 129 | #else | ||
| 130 | abort (); | ||
| 131 | #endif | ||
| 132 | } | 123 | } |
| 133 | 124 | ||
| 134 | void | 125 | void |
| @@ -141,16 +132,14 @@ void | |||
| 141 | args_out_of_range (a1, a2) | 132 | args_out_of_range (a1, a2) |
| 142 | Lisp_Object a1, a2; | 133 | Lisp_Object a1, a2; |
| 143 | { | 134 | { |
| 144 | while (1) | 135 | xsignal2 (Qargs_out_of_range, a1, a2); |
| 145 | Fsignal (Qargs_out_of_range, Fcons (a1, Fcons (a2, Qnil))); | ||
| 146 | } | 136 | } |
| 147 | 137 | ||
| 148 | void | 138 | void |
| 149 | args_out_of_range_3 (a1, a2, a3) | 139 | args_out_of_range_3 (a1, a2, a3) |
| 150 | Lisp_Object a1, a2, a3; | 140 | Lisp_Object a1, a2, a3; |
| 151 | { | 141 | { |
| 152 | while (1) | 142 | xsignal3 (Qargs_out_of_range, a1, a2, a3); |
| 153 | Fsignal (Qargs_out_of_range, Fcons (a1, Fcons (a2, Fcons (a3, Qnil)))); | ||
| 154 | } | 143 | } |
| 155 | 144 | ||
| 156 | /* On some machines, XINT needs a temporary location. | 145 | /* On some machines, XINT needs a temporary location. |
| @@ -619,7 +608,7 @@ Return SYMBOL. */) | |||
| 619 | { | 608 | { |
| 620 | CHECK_SYMBOL (symbol); | 609 | CHECK_SYMBOL (symbol); |
| 621 | if (XSYMBOL (symbol)->constant) | 610 | if (XSYMBOL (symbol)->constant) |
| 622 | return Fsignal (Qsetting_constant, Fcons (symbol, Qnil)); | 611 | xsignal1 (Qsetting_constant, symbol); |
| 623 | Fset (symbol, Qunbound); | 612 | Fset (symbol, Qunbound); |
| 624 | return symbol; | 613 | return symbol; |
| 625 | } | 614 | } |
| @@ -632,7 +621,7 @@ Return SYMBOL. */) | |||
| 632 | { | 621 | { |
| 633 | CHECK_SYMBOL (symbol); | 622 | CHECK_SYMBOL (symbol); |
| 634 | if (NILP (symbol) || EQ (symbol, Qt)) | 623 | if (NILP (symbol) || EQ (symbol, Qt)) |
| 635 | return Fsignal (Qsetting_constant, Fcons (symbol, Qnil)); | 624 | xsignal1 (Qsetting_constant, symbol); |
| 636 | XSYMBOL (symbol)->function = Qunbound; | 625 | XSYMBOL (symbol)->function = Qunbound; |
| 637 | return symbol; | 626 | return symbol; |
| 638 | } | 627 | } |
| @@ -643,9 +632,9 @@ DEFUN ("symbol-function", Fsymbol_function, Ssymbol_function, 1, 1, 0, | |||
| 643 | register Lisp_Object symbol; | 632 | register Lisp_Object symbol; |
| 644 | { | 633 | { |
| 645 | CHECK_SYMBOL (symbol); | 634 | CHECK_SYMBOL (symbol); |
| 646 | if (EQ (XSYMBOL (symbol)->function, Qunbound)) | 635 | if (!EQ (XSYMBOL (symbol)->function, Qunbound)) |
| 647 | return Fsignal (Qvoid_function, Fcons (symbol, Qnil)); | 636 | return XSYMBOL (symbol)->function; |
| 648 | return XSYMBOL (symbol)->function; | 637 | xsignal1 (Qvoid_function, symbol); |
| 649 | } | 638 | } |
| 650 | 639 | ||
| 651 | DEFUN ("symbol-plist", Fsymbol_plist, Ssymbol_plist, 1, 1, 0, | 640 | DEFUN ("symbol-plist", Fsymbol_plist, Ssymbol_plist, 1, 1, 0, |
| @@ -676,7 +665,7 @@ DEFUN ("fset", Ffset, Sfset, 2, 2, 0, | |||
| 676 | { | 665 | { |
| 677 | CHECK_SYMBOL (symbol); | 666 | CHECK_SYMBOL (symbol); |
| 678 | if (NILP (symbol) || EQ (symbol, Qt)) | 667 | if (NILP (symbol) || EQ (symbol, Qt)) |
| 679 | return Fsignal (Qsetting_constant, Fcons (symbol, Qnil)); | 668 | xsignal1 (Qsetting_constant, symbol); |
| 680 | if (!NILP (Vautoload_queue) && !EQ (XSYMBOL (symbol)->function, Qunbound)) | 669 | if (!NILP (Vautoload_queue) && !EQ (XSYMBOL (symbol)->function, Qunbound)) |
| 681 | Vautoload_queue = Fcons (Fcons (symbol, XSYMBOL (symbol)->function), | 670 | Vautoload_queue = Fcons (Fcons (symbol, XSYMBOL (symbol)->function), |
| 682 | Vautoload_queue); | 671 | Vautoload_queue); |
| @@ -818,7 +807,7 @@ indirect_variable (symbol) | |||
| 818 | tortoise = XSYMBOL (tortoise)->value; | 807 | tortoise = XSYMBOL (tortoise)->value; |
| 819 | 808 | ||
| 820 | if (EQ (hare, tortoise)) | 809 | if (EQ (hare, tortoise)) |
| 821 | Fsignal (Qcyclic_variable_indirection, Fcons (symbol, Qnil)); | 810 | xsignal1 (Qcyclic_variable_indirection, symbol); |
| 822 | } | 811 | } |
| 823 | 812 | ||
| 824 | return hare; | 813 | return hare; |
| @@ -1130,10 +1119,10 @@ DEFUN ("symbol-value", Fsymbol_value, Ssymbol_value, 1, 1, 0, | |||
| 1130 | Lisp_Object val; | 1119 | Lisp_Object val; |
| 1131 | 1120 | ||
| 1132 | val = find_symbol_value (symbol); | 1121 | val = find_symbol_value (symbol); |
| 1133 | if (EQ (val, Qunbound)) | 1122 | if (!EQ (val, Qunbound)) |
| 1134 | return Fsignal (Qvoid_variable, Fcons (symbol, Qnil)); | ||
| 1135 | else | ||
| 1136 | return val; | 1123 | return val; |
| 1124 | |||
| 1125 | xsignal1 (Qvoid_variable, symbol); | ||
| 1137 | } | 1126 | } |
| 1138 | 1127 | ||
| 1139 | DEFUN ("set", Fset, Sset, 2, 2, 0, | 1128 | DEFUN ("set", Fset, Sset, 2, 2, 0, |
| @@ -1197,7 +1186,7 @@ set_internal (symbol, newval, buf, bindflag) | |||
| 1197 | if (SYMBOL_CONSTANT_P (symbol) | 1186 | if (SYMBOL_CONSTANT_P (symbol) |
| 1198 | && (NILP (Fkeywordp (symbol)) | 1187 | && (NILP (Fkeywordp (symbol)) |
| 1199 | || !EQ (newval, SYMBOL_VALUE (symbol)))) | 1188 | || !EQ (newval, SYMBOL_VALUE (symbol)))) |
| 1200 | return Fsignal (Qsetting_constant, Fcons (symbol, Qnil)); | 1189 | xsignal1 (Qsetting_constant, symbol); |
| 1201 | 1190 | ||
| 1202 | innercontents = valcontents = SYMBOL_VALUE (symbol); | 1191 | innercontents = valcontents = SYMBOL_VALUE (symbol); |
| 1203 | 1192 | ||
| @@ -1391,9 +1380,10 @@ local bindings in certain buffers. */) | |||
| 1391 | register Lisp_Object value; | 1380 | register Lisp_Object value; |
| 1392 | 1381 | ||
| 1393 | value = default_value (symbol); | 1382 | value = default_value (symbol); |
| 1394 | if (EQ (value, Qunbound)) | 1383 | if (!EQ (value, Qunbound)) |
| 1395 | return Fsignal (Qvoid_variable, Fcons (symbol, Qnil)); | 1384 | return value; |
| 1396 | return value; | 1385 | |
| 1386 | xsignal1 (Qvoid_variable, symbol); | ||
| 1397 | } | 1387 | } |
| 1398 | 1388 | ||
| 1399 | DEFUN ("set-default", Fset_default, Sset_default, 2, 2, 0, | 1389 | DEFUN ("set-default", Fset_default, Sset_default, 2, 2, 0, |
| @@ -1950,7 +1940,7 @@ indirect_function (object) | |||
| 1950 | tortoise = XSYMBOL (tortoise)->function; | 1940 | tortoise = XSYMBOL (tortoise)->function; |
| 1951 | 1941 | ||
| 1952 | if (EQ (hare, tortoise)) | 1942 | if (EQ (hare, tortoise)) |
| 1953 | Fsignal (Qcyclic_function_indirection, Fcons (object, Qnil)); | 1943 | xsignal1 (Qcyclic_function_indirection, object); |
| 1954 | } | 1944 | } |
| 1955 | 1945 | ||
| 1956 | return hare; | 1946 | return hare; |
| @@ -1979,7 +1969,7 @@ function chain of symbols. */) | |||
| 1979 | return result; | 1969 | return result; |
| 1980 | 1970 | ||
| 1981 | if (NILP (noerror)) | 1971 | if (NILP (noerror)) |
| 1982 | Fsignal (Qvoid_function, Fcons (object, Qnil)); | 1972 | xsignal1 (Qvoid_function, object); |
| 1983 | 1973 | ||
| 1984 | return Qnil; | 1974 | return Qnil; |
| 1985 | } | 1975 | } |
| @@ -2519,7 +2509,7 @@ If the base used is not 10, floating point is not recognized. */) | |||
| 2519 | CHECK_NUMBER (base); | 2509 | CHECK_NUMBER (base); |
| 2520 | b = XINT (base); | 2510 | b = XINT (base); |
| 2521 | if (b < 2 || b > 16) | 2511 | if (b < 2 || b > 16) |
| 2522 | Fsignal (Qargs_out_of_range, Fcons (base, Qnil)); | 2512 | xsignal1 (Qargs_out_of_range, base); |
| 2523 | } | 2513 | } |
| 2524 | 2514 | ||
| 2525 | /* Skip any whitespace at the front of the number. Some versions of | 2515 | /* Skip any whitespace at the front of the number. Some versions of |
| @@ -2631,7 +2621,7 @@ arith_driver (code, nargs, args) | |||
| 2631 | else | 2621 | else |
| 2632 | { | 2622 | { |
| 2633 | if (next == 0) | 2623 | if (next == 0) |
| 2634 | Fsignal (Qarith_error, Qnil); | 2624 | xsignal0 (Qarith_error); |
| 2635 | accum /= next; | 2625 | accum /= next; |
| 2636 | } | 2626 | } |
| 2637 | break; | 2627 | break; |
| @@ -2704,7 +2694,7 @@ float_arith_driver (accum, argnum, code, nargs, args) | |||
| 2704 | else | 2694 | else |
| 2705 | { | 2695 | { |
| 2706 | if (! IEEE_FLOATING_POINT && next == 0) | 2696 | if (! IEEE_FLOATING_POINT && next == 0) |
| 2707 | Fsignal (Qarith_error, Qnil); | 2697 | xsignal0 (Qarith_error); |
| 2708 | accum /= next; | 2698 | accum /= next; |
| 2709 | } | 2699 | } |
| 2710 | break; | 2700 | break; |
| @@ -2786,7 +2776,7 @@ Both must be integers or markers. */) | |||
| 2786 | CHECK_NUMBER_COERCE_MARKER (y); | 2776 | CHECK_NUMBER_COERCE_MARKER (y); |
| 2787 | 2777 | ||
| 2788 | if (XFASTINT (y) == 0) | 2778 | if (XFASTINT (y) == 0) |
| 2789 | Fsignal (Qarith_error, Qnil); | 2779 | xsignal0 (Qarith_error); |
| 2790 | 2780 | ||
| 2791 | XSETINT (val, XINT (x) % XINT (y)); | 2781 | XSETINT (val, XINT (x) % XINT (y)); |
| 2792 | return val; | 2782 | return val; |
| @@ -2835,7 +2825,7 @@ Both X and Y must be numbers or markers. */) | |||
| 2835 | i2 = XINT (y); | 2825 | i2 = XINT (y); |
| 2836 | 2826 | ||
| 2837 | if (i2 == 0) | 2827 | if (i2 == 0) |
| 2838 | Fsignal (Qarith_error, Qnil); | 2828 | xsignal0 (Qarith_error); |
| 2839 | 2829 | ||
| 2840 | i1 %= i2; | 2830 | i1 %= i2; |
| 2841 | 2831 | ||
| @@ -3443,7 +3433,7 @@ arith_error (signo) | |||
| 3443 | #endif /* not BSD4_1 */ | 3433 | #endif /* not BSD4_1 */ |
| 3444 | 3434 | ||
| 3445 | SIGNAL_THREAD_CHECK (signo); | 3435 | SIGNAL_THREAD_CHECK (signo); |
| 3446 | Fsignal (Qarith_error, Qnil); | 3436 | xsignal0 (Qarith_error); |
| 3447 | } | 3437 | } |
| 3448 | 3438 | ||
| 3449 | void | 3439 | void |