diff options
Diffstat (limited to 'src')
| -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 f715be56cee..761159ec066 100644 --- a/src/data.c +++ b/src/data.c | |||
| @@ -105,7 +105,7 @@ void | |||
| 105 | circular_list_error (list) | 105 | circular_list_error (list) |
| 106 | Lisp_Object list; | 106 | Lisp_Object list; |
| 107 | { | 107 | { |
| 108 | Fsignal (Qcircular_list, list); | 108 | xsignal (Qcircular_list, list); |
| 109 | } | 109 | } |
| 110 | 110 | ||
| 111 | 111 | ||
| @@ -118,16 +118,7 @@ wrong_type_argument (predicate, value) | |||
| 118 | if ((unsigned int) XGCTYPE (value) >= Lisp_Type_Limit) | 118 | if ((unsigned int) XGCTYPE (value) >= Lisp_Type_Limit) |
| 119 | abort (); | 119 | abort (); |
| 120 | 120 | ||
| 121 | Fsignal (Qwrong_type_argument, list2 (predicate, value)); | 121 | xsignal2 (Qwrong_type_argument, predicate, value); |
| 122 | |||
| 123 | /* This function is marked as NO_RETURN, gcc would warn if it has a | ||
| 124 | return statement or if falls off the function. Other compilers | ||
| 125 | warn if no return statement is present. */ | ||
| 126 | #ifndef __GNUC__ | ||
| 127 | return value; | ||
| 128 | #else | ||
| 129 | abort (); | ||
| 130 | #endif | ||
| 131 | } | 122 | } |
| 132 | 123 | ||
| 133 | void | 124 | void |
| @@ -140,16 +131,14 @@ void | |||
| 140 | args_out_of_range (a1, a2) | 131 | args_out_of_range (a1, a2) |
| 141 | Lisp_Object a1, a2; | 132 | Lisp_Object a1, a2; |
| 142 | { | 133 | { |
| 143 | while (1) | 134 | xsignal2 (Qargs_out_of_range, a1, a2); |
| 144 | Fsignal (Qargs_out_of_range, Fcons (a1, Fcons (a2, Qnil))); | ||
| 145 | } | 135 | } |
| 146 | 136 | ||
| 147 | void | 137 | void |
| 148 | args_out_of_range_3 (a1, a2, a3) | 138 | args_out_of_range_3 (a1, a2, a3) |
| 149 | Lisp_Object a1, a2, a3; | 139 | Lisp_Object a1, a2, a3; |
| 150 | { | 140 | { |
| 151 | while (1) | 141 | xsignal3 (Qargs_out_of_range, a1, a2, a3); |
| 152 | Fsignal (Qargs_out_of_range, Fcons (a1, Fcons (a2, Fcons (a3, Qnil)))); | ||
| 153 | } | 142 | } |
| 154 | 143 | ||
| 155 | /* On some machines, XINT needs a temporary location. | 144 | /* On some machines, XINT needs a temporary location. |
| @@ -618,7 +607,7 @@ Return SYMBOL. */) | |||
| 618 | { | 607 | { |
| 619 | CHECK_SYMBOL (symbol); | 608 | CHECK_SYMBOL (symbol); |
| 620 | if (XSYMBOL (symbol)->constant) | 609 | if (XSYMBOL (symbol)->constant) |
| 621 | return Fsignal (Qsetting_constant, Fcons (symbol, Qnil)); | 610 | xsignal1 (Qsetting_constant, symbol); |
| 622 | Fset (symbol, Qunbound); | 611 | Fset (symbol, Qunbound); |
| 623 | return symbol; | 612 | return symbol; |
| 624 | } | 613 | } |
| @@ -631,7 +620,7 @@ Return SYMBOL. */) | |||
| 631 | { | 620 | { |
| 632 | CHECK_SYMBOL (symbol); | 621 | CHECK_SYMBOL (symbol); |
| 633 | if (NILP (symbol) || EQ (symbol, Qt)) | 622 | if (NILP (symbol) || EQ (symbol, Qt)) |
| 634 | return Fsignal (Qsetting_constant, Fcons (symbol, Qnil)); | 623 | xsignal1 (Qsetting_constant, symbol); |
| 635 | XSYMBOL (symbol)->function = Qunbound; | 624 | XSYMBOL (symbol)->function = Qunbound; |
| 636 | return symbol; | 625 | return symbol; |
| 637 | } | 626 | } |
| @@ -642,9 +631,9 @@ DEFUN ("symbol-function", Fsymbol_function, Ssymbol_function, 1, 1, 0, | |||
| 642 | register Lisp_Object symbol; | 631 | register Lisp_Object symbol; |
| 643 | { | 632 | { |
| 644 | CHECK_SYMBOL (symbol); | 633 | CHECK_SYMBOL (symbol); |
| 645 | if (EQ (XSYMBOL (symbol)->function, Qunbound)) | 634 | if (!EQ (XSYMBOL (symbol)->function, Qunbound)) |
| 646 | return Fsignal (Qvoid_function, Fcons (symbol, Qnil)); | 635 | return XSYMBOL (symbol)->function; |
| 647 | return XSYMBOL (symbol)->function; | 636 | xsignal1 (Qvoid_function, symbol); |
| 648 | } | 637 | } |
| 649 | 638 | ||
| 650 | DEFUN ("symbol-plist", Fsymbol_plist, Ssymbol_plist, 1, 1, 0, | 639 | DEFUN ("symbol-plist", Fsymbol_plist, Ssymbol_plist, 1, 1, 0, |
| @@ -675,7 +664,7 @@ DEFUN ("fset", Ffset, Sfset, 2, 2, 0, | |||
| 675 | { | 664 | { |
| 676 | CHECK_SYMBOL (symbol); | 665 | CHECK_SYMBOL (symbol); |
| 677 | if (NILP (symbol) || EQ (symbol, Qt)) | 666 | if (NILP (symbol) || EQ (symbol, Qt)) |
| 678 | return Fsignal (Qsetting_constant, Fcons (symbol, Qnil)); | 667 | xsignal1 (Qsetting_constant, symbol); |
| 679 | if (!NILP (Vautoload_queue) && !EQ (XSYMBOL (symbol)->function, Qunbound)) | 668 | if (!NILP (Vautoload_queue) && !EQ (XSYMBOL (symbol)->function, Qunbound)) |
| 680 | Vautoload_queue = Fcons (Fcons (symbol, XSYMBOL (symbol)->function), | 669 | Vautoload_queue = Fcons (Fcons (symbol, XSYMBOL (symbol)->function), |
| 681 | Vautoload_queue); | 670 | Vautoload_queue); |
| @@ -817,7 +806,7 @@ indirect_variable (symbol) | |||
| 817 | tortoise = XSYMBOL (tortoise)->value; | 806 | tortoise = XSYMBOL (tortoise)->value; |
| 818 | 807 | ||
| 819 | if (EQ (hare, tortoise)) | 808 | if (EQ (hare, tortoise)) |
| 820 | Fsignal (Qcyclic_variable_indirection, Fcons (symbol, Qnil)); | 809 | xsignal1 (Qcyclic_variable_indirection, symbol); |
| 821 | } | 810 | } |
| 822 | 811 | ||
| 823 | return hare; | 812 | return hare; |
| @@ -1118,10 +1107,10 @@ DEFUN ("symbol-value", Fsymbol_value, Ssymbol_value, 1, 1, 0, | |||
| 1118 | Lisp_Object val; | 1107 | Lisp_Object val; |
| 1119 | 1108 | ||
| 1120 | val = find_symbol_value (symbol); | 1109 | val = find_symbol_value (symbol); |
| 1121 | if (EQ (val, Qunbound)) | 1110 | if (!EQ (val, Qunbound)) |
| 1122 | return Fsignal (Qvoid_variable, Fcons (symbol, Qnil)); | ||
| 1123 | else | ||
| 1124 | return val; | 1111 | return val; |
| 1112 | |||
| 1113 | xsignal1 (Qvoid_variable, symbol); | ||
| 1125 | } | 1114 | } |
| 1126 | 1115 | ||
| 1127 | DEFUN ("set", Fset, Sset, 2, 2, 0, | 1116 | DEFUN ("set", Fset, Sset, 2, 2, 0, |
| @@ -1185,7 +1174,7 @@ set_internal (symbol, newval, buf, bindflag) | |||
| 1185 | if (SYMBOL_CONSTANT_P (symbol) | 1174 | if (SYMBOL_CONSTANT_P (symbol) |
| 1186 | && (NILP (Fkeywordp (symbol)) | 1175 | && (NILP (Fkeywordp (symbol)) |
| 1187 | || !EQ (newval, SYMBOL_VALUE (symbol)))) | 1176 | || !EQ (newval, SYMBOL_VALUE (symbol)))) |
| 1188 | return Fsignal (Qsetting_constant, Fcons (symbol, Qnil)); | 1177 | xsignal1 (Qsetting_constant, symbol); |
| 1189 | 1178 | ||
| 1190 | innercontents = valcontents = SYMBOL_VALUE (symbol); | 1179 | innercontents = valcontents = SYMBOL_VALUE (symbol); |
| 1191 | 1180 | ||
| @@ -1379,9 +1368,10 @@ local bindings in certain buffers. */) | |||
| 1379 | register Lisp_Object value; | 1368 | register Lisp_Object value; |
| 1380 | 1369 | ||
| 1381 | value = default_value (symbol); | 1370 | value = default_value (symbol); |
| 1382 | if (EQ (value, Qunbound)) | 1371 | if (!EQ (value, Qunbound)) |
| 1383 | return Fsignal (Qvoid_variable, Fcons (symbol, Qnil)); | 1372 | return value; |
| 1384 | return value; | 1373 | |
| 1374 | xsignal1 (Qvoid_variable, symbol); | ||
| 1385 | } | 1375 | } |
| 1386 | 1376 | ||
| 1387 | DEFUN ("set-default", Fset_default, Sset_default, 2, 2, 0, | 1377 | DEFUN ("set-default", Fset_default, Sset_default, 2, 2, 0, |
| @@ -1893,7 +1883,7 @@ indirect_function (object) | |||
| 1893 | tortoise = XSYMBOL (tortoise)->function; | 1883 | tortoise = XSYMBOL (tortoise)->function; |
| 1894 | 1884 | ||
| 1895 | if (EQ (hare, tortoise)) | 1885 | if (EQ (hare, tortoise)) |
| 1896 | Fsignal (Qcyclic_function_indirection, Fcons (object, Qnil)); | 1886 | xsignal1 (Qcyclic_function_indirection, object); |
| 1897 | } | 1887 | } |
| 1898 | 1888 | ||
| 1899 | return hare; | 1889 | return hare; |
| @@ -1922,7 +1912,7 @@ function chain of symbols. */) | |||
| 1922 | return result; | 1912 | return result; |
| 1923 | 1913 | ||
| 1924 | if (NILP (noerror)) | 1914 | if (NILP (noerror)) |
| 1925 | Fsignal (Qvoid_function, Fcons (object, Qnil)); | 1915 | xsignal1 (Qvoid_function, object); |
| 1926 | 1916 | ||
| 1927 | return Qnil; | 1917 | return Qnil; |
| 1928 | } | 1918 | } |
| @@ -2462,7 +2452,7 @@ If the base used is not 10, floating point is not recognized. */) | |||
| 2462 | CHECK_NUMBER (base); | 2452 | CHECK_NUMBER (base); |
| 2463 | b = XINT (base); | 2453 | b = XINT (base); |
| 2464 | if (b < 2 || b > 16) | 2454 | if (b < 2 || b > 16) |
| 2465 | Fsignal (Qargs_out_of_range, Fcons (base, Qnil)); | 2455 | xsignal1 (Qargs_out_of_range, base); |
| 2466 | } | 2456 | } |
| 2467 | 2457 | ||
| 2468 | /* Skip any whitespace at the front of the number. Some versions of | 2458 | /* Skip any whitespace at the front of the number. Some versions of |
| @@ -2574,7 +2564,7 @@ arith_driver (code, nargs, args) | |||
| 2574 | else | 2564 | else |
| 2575 | { | 2565 | { |
| 2576 | if (next == 0) | 2566 | if (next == 0) |
| 2577 | Fsignal (Qarith_error, Qnil); | 2567 | xsignal0 (Qarith_error); |
| 2578 | accum /= next; | 2568 | accum /= next; |
| 2579 | } | 2569 | } |
| 2580 | break; | 2570 | break; |
| @@ -2647,7 +2637,7 @@ float_arith_driver (accum, argnum, code, nargs, args) | |||
| 2647 | else | 2637 | else |
| 2648 | { | 2638 | { |
| 2649 | if (! IEEE_FLOATING_POINT && next == 0) | 2639 | if (! IEEE_FLOATING_POINT && next == 0) |
| 2650 | Fsignal (Qarith_error, Qnil); | 2640 | xsignal0 (Qarith_error); |
| 2651 | accum /= next; | 2641 | accum /= next; |
| 2652 | } | 2642 | } |
| 2653 | break; | 2643 | break; |
| @@ -2729,7 +2719,7 @@ Both must be integers or markers. */) | |||
| 2729 | CHECK_NUMBER_COERCE_MARKER (y); | 2719 | CHECK_NUMBER_COERCE_MARKER (y); |
| 2730 | 2720 | ||
| 2731 | if (XFASTINT (y) == 0) | 2721 | if (XFASTINT (y) == 0) |
| 2732 | Fsignal (Qarith_error, Qnil); | 2722 | xsignal0 (Qarith_error); |
| 2733 | 2723 | ||
| 2734 | XSETINT (val, XINT (x) % XINT (y)); | 2724 | XSETINT (val, XINT (x) % XINT (y)); |
| 2735 | return val; | 2725 | return val; |
| @@ -2778,7 +2768,7 @@ Both X and Y must be numbers or markers. */) | |||
| 2778 | i2 = XINT (y); | 2768 | i2 = XINT (y); |
| 2779 | 2769 | ||
| 2780 | if (i2 == 0) | 2770 | if (i2 == 0) |
| 2781 | Fsignal (Qarith_error, Qnil); | 2771 | xsignal0 (Qarith_error); |
| 2782 | 2772 | ||
| 2783 | i1 %= i2; | 2773 | i1 %= i2; |
| 2784 | 2774 | ||
| @@ -3382,7 +3372,7 @@ arith_error (signo) | |||
| 3382 | #endif /* not BSD4_1 */ | 3372 | #endif /* not BSD4_1 */ |
| 3383 | 3373 | ||
| 3384 | SIGNAL_THREAD_CHECK (signo); | 3374 | SIGNAL_THREAD_CHECK (signo); |
| 3385 | Fsignal (Qarith_error, Qnil); | 3375 | xsignal0 (Qarith_error); |
| 3386 | } | 3376 | } |
| 3387 | 3377 | ||
| 3388 | void | 3378 | void |