diff options
| author | Paul Eggert | 2012-05-25 11:19:24 -0700 |
|---|---|---|
| committer | Paul Eggert | 2012-05-25 11:19:24 -0700 |
| commit | 42b2a986d9d4b7040fb20c90ec0efeffb78e761a (patch) | |
| tree | d38e7bf5307837f2f38982757f088100de18a64e /src/data.c | |
| parent | e4d81efc58695c19154d5f6733d91172b4c3e5b7 (diff) | |
| parent | a8d3cbf75d219d7a249fc0623219511179e959da (diff) | |
| download | emacs-42b2a986d9d4b7040fb20c90ec0efeffb78e761a.tar.gz emacs-42b2a986d9d4b7040fb20c90ec0efeffb78e761a.zip | |
Merge from trunk.
Diffstat (limited to 'src/data.c')
| -rw-r--r-- | src/data.c | 164 |
1 files changed, 46 insertions, 118 deletions
diff --git a/src/data.c b/src/data.c index 7c0d1830344..11660a2483d 100644 --- a/src/data.c +++ b/src/data.c | |||
| @@ -51,7 +51,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 51 | Lisp_Object Qnil, Qt, Qquote, Qlambda, Qunbound; | 51 | Lisp_Object Qnil, Qt, Qquote, Qlambda, Qunbound; |
| 52 | static Lisp_Object Qsubr; | 52 | static Lisp_Object Qsubr; |
| 53 | Lisp_Object Qerror_conditions, Qerror_message, Qtop_level; | 53 | Lisp_Object Qerror_conditions, Qerror_message, Qtop_level; |
| 54 | Lisp_Object Qerror, Qquit, Qargs_out_of_range; | 54 | Lisp_Object Qerror, Quser_error, Qquit, Qargs_out_of_range; |
| 55 | static Lisp_Object Qwrong_type_argument; | 55 | static Lisp_Object Qwrong_type_argument; |
| 56 | Lisp_Object Qvoid_variable, Qvoid_function; | 56 | Lisp_Object Qvoid_variable, Qvoid_function; |
| 57 | static Lisp_Object Qcyclic_function_indirection; | 57 | static Lisp_Object Qcyclic_function_indirection; |
| @@ -2938,6 +2938,7 @@ syms_of_data (void) | |||
| 2938 | DEFSYM (Qtop_level, "top-level"); | 2938 | DEFSYM (Qtop_level, "top-level"); |
| 2939 | 2939 | ||
| 2940 | DEFSYM (Qerror, "error"); | 2940 | DEFSYM (Qerror, "error"); |
| 2941 | DEFSYM (Quser_error, "user-error"); | ||
| 2941 | DEFSYM (Qquit, "quit"); | 2942 | DEFSYM (Qquit, "quit"); |
| 2942 | DEFSYM (Qwrong_type_argument, "wrong-type-argument"); | 2943 | DEFSYM (Qwrong_type_argument, "wrong-type-argument"); |
| 2943 | DEFSYM (Qargs_out_of_range, "args-out-of-range"); | 2944 | DEFSYM (Qargs_out_of_range, "args-out-of-range"); |
| @@ -3005,102 +3006,42 @@ syms_of_data (void) | |||
| 3005 | Fput (Qerror, Qerror_message, | 3006 | Fput (Qerror, Qerror_message, |
| 3006 | make_pure_c_string ("error")); | 3007 | make_pure_c_string ("error")); |
| 3007 | 3008 | ||
| 3008 | Fput (Qquit, Qerror_conditions, | 3009 | #define PUT_ERROR(sym, tail, msg) \ |
| 3009 | pure_cons (Qquit, Qnil)); | 3010 | Fput (sym, Qerror_conditions, pure_cons (sym, tail)); \ |
| 3010 | Fput (Qquit, Qerror_message, | 3011 | Fput (sym, Qerror_message, make_pure_c_string (msg)) |
| 3011 | make_pure_c_string ("Quit")); | 3012 | |
| 3012 | 3013 | PUT_ERROR (Qquit, Qnil, "Quit"); | |
| 3013 | Fput (Qwrong_type_argument, Qerror_conditions, | 3014 | |
| 3014 | pure_cons (Qwrong_type_argument, error_tail)); | 3015 | PUT_ERROR (Quser_error, error_tail, ""); |
| 3015 | Fput (Qwrong_type_argument, Qerror_message, | 3016 | PUT_ERROR (Qwrong_type_argument, error_tail, "Wrong type argument"); |
| 3016 | make_pure_c_string ("Wrong type argument")); | 3017 | PUT_ERROR (Qargs_out_of_range, error_tail, "Args out of range"); |
| 3017 | 3018 | PUT_ERROR (Qvoid_function, error_tail, | |
| 3018 | Fput (Qargs_out_of_range, Qerror_conditions, | 3019 | "Symbol's function definition is void"); |
| 3019 | pure_cons (Qargs_out_of_range, error_tail)); | 3020 | PUT_ERROR (Qcyclic_function_indirection, error_tail, |
| 3020 | Fput (Qargs_out_of_range, Qerror_message, | 3021 | "Symbol's chain of function indirections contains a loop"); |
| 3021 | make_pure_c_string ("Args out of range")); | 3022 | PUT_ERROR (Qcyclic_variable_indirection, error_tail, |
| 3022 | 3023 | "Symbol's chain of variable indirections contains a loop"); | |
| 3023 | Fput (Qvoid_function, Qerror_conditions, | ||
| 3024 | pure_cons (Qvoid_function, error_tail)); | ||
| 3025 | Fput (Qvoid_function, Qerror_message, | ||
| 3026 | make_pure_c_string ("Symbol's function definition is void")); | ||
| 3027 | |||
| 3028 | Fput (Qcyclic_function_indirection, Qerror_conditions, | ||
| 3029 | pure_cons (Qcyclic_function_indirection, error_tail)); | ||
| 3030 | Fput (Qcyclic_function_indirection, Qerror_message, | ||
| 3031 | make_pure_c_string ("Symbol's chain of function indirections contains a loop")); | ||
| 3032 | |||
| 3033 | Fput (Qcyclic_variable_indirection, Qerror_conditions, | ||
| 3034 | pure_cons (Qcyclic_variable_indirection, error_tail)); | ||
| 3035 | Fput (Qcyclic_variable_indirection, Qerror_message, | ||
| 3036 | make_pure_c_string ("Symbol's chain of variable indirections contains a loop")); | ||
| 3037 | |||
| 3038 | DEFSYM (Qcircular_list, "circular-list"); | 3024 | DEFSYM (Qcircular_list, "circular-list"); |
| 3039 | Fput (Qcircular_list, Qerror_conditions, | 3025 | PUT_ERROR (Qcircular_list, error_tail, "List contains a loop"); |
| 3040 | pure_cons (Qcircular_list, error_tail)); | 3026 | PUT_ERROR (Qvoid_variable, error_tail, "Symbol's value as variable is void"); |
| 3041 | Fput (Qcircular_list, Qerror_message, | 3027 | PUT_ERROR (Qsetting_constant, error_tail, |
| 3042 | make_pure_c_string ("List contains a loop")); | 3028 | "Attempt to set a constant symbol"); |
| 3043 | 3029 | PUT_ERROR (Qinvalid_read_syntax, error_tail, "Invalid read syntax"); | |
| 3044 | Fput (Qvoid_variable, Qerror_conditions, | 3030 | PUT_ERROR (Qinvalid_function, error_tail, "Invalid function"); |
| 3045 | pure_cons (Qvoid_variable, error_tail)); | 3031 | PUT_ERROR (Qwrong_number_of_arguments, error_tail, |
| 3046 | Fput (Qvoid_variable, Qerror_message, | 3032 | "Wrong number of arguments"); |
| 3047 | make_pure_c_string ("Symbol's value as variable is void")); | 3033 | PUT_ERROR (Qno_catch, error_tail, "No catch for tag"); |
| 3048 | 3034 | PUT_ERROR (Qend_of_file, error_tail, "End of file during parsing"); | |
| 3049 | Fput (Qsetting_constant, Qerror_conditions, | ||
| 3050 | pure_cons (Qsetting_constant, error_tail)); | ||
| 3051 | Fput (Qsetting_constant, Qerror_message, | ||
| 3052 | make_pure_c_string ("Attempt to set a constant symbol")); | ||
| 3053 | |||
| 3054 | Fput (Qinvalid_read_syntax, Qerror_conditions, | ||
| 3055 | pure_cons (Qinvalid_read_syntax, error_tail)); | ||
| 3056 | Fput (Qinvalid_read_syntax, Qerror_message, | ||
| 3057 | make_pure_c_string ("Invalid read syntax")); | ||
| 3058 | |||
| 3059 | Fput (Qinvalid_function, Qerror_conditions, | ||
| 3060 | pure_cons (Qinvalid_function, error_tail)); | ||
| 3061 | Fput (Qinvalid_function, Qerror_message, | ||
| 3062 | make_pure_c_string ("Invalid function")); | ||
| 3063 | |||
| 3064 | Fput (Qwrong_number_of_arguments, Qerror_conditions, | ||
| 3065 | pure_cons (Qwrong_number_of_arguments, error_tail)); | ||
| 3066 | Fput (Qwrong_number_of_arguments, Qerror_message, | ||
| 3067 | make_pure_c_string ("Wrong number of arguments")); | ||
| 3068 | |||
| 3069 | Fput (Qno_catch, Qerror_conditions, | ||
| 3070 | pure_cons (Qno_catch, error_tail)); | ||
| 3071 | Fput (Qno_catch, Qerror_message, | ||
| 3072 | make_pure_c_string ("No catch for tag")); | ||
| 3073 | |||
| 3074 | Fput (Qend_of_file, Qerror_conditions, | ||
| 3075 | pure_cons (Qend_of_file, error_tail)); | ||
| 3076 | Fput (Qend_of_file, Qerror_message, | ||
| 3077 | make_pure_c_string ("End of file during parsing")); | ||
| 3078 | 3035 | ||
| 3079 | arith_tail = pure_cons (Qarith_error, error_tail); | 3036 | arith_tail = pure_cons (Qarith_error, error_tail); |
| 3080 | Fput (Qarith_error, Qerror_conditions, | 3037 | Fput (Qarith_error, Qerror_conditions, arith_tail); |
| 3081 | arith_tail); | 3038 | Fput (Qarith_error, Qerror_message, make_pure_c_string ("Arithmetic error")); |
| 3082 | Fput (Qarith_error, Qerror_message, | 3039 | |
| 3083 | make_pure_c_string ("Arithmetic error")); | 3040 | PUT_ERROR (Qbeginning_of_buffer, error_tail, "Beginning of buffer"); |
| 3084 | 3041 | PUT_ERROR (Qend_of_buffer, error_tail, "End of buffer"); | |
| 3085 | Fput (Qbeginning_of_buffer, Qerror_conditions, | 3042 | PUT_ERROR (Qbuffer_read_only, error_tail, "Buffer is read-only"); |
| 3086 | pure_cons (Qbeginning_of_buffer, error_tail)); | 3043 | PUT_ERROR (Qtext_read_only, pure_cons (Qbuffer_read_only, error_tail), |
| 3087 | Fput (Qbeginning_of_buffer, Qerror_message, | 3044 | "Text is read-only"); |
| 3088 | make_pure_c_string ("Beginning of buffer")); | ||
| 3089 | |||
| 3090 | Fput (Qend_of_buffer, Qerror_conditions, | ||
| 3091 | pure_cons (Qend_of_buffer, error_tail)); | ||
| 3092 | Fput (Qend_of_buffer, Qerror_message, | ||
| 3093 | make_pure_c_string ("End of buffer")); | ||
| 3094 | |||
| 3095 | Fput (Qbuffer_read_only, Qerror_conditions, | ||
| 3096 | pure_cons (Qbuffer_read_only, error_tail)); | ||
| 3097 | Fput (Qbuffer_read_only, Qerror_message, | ||
| 3098 | make_pure_c_string ("Buffer is read-only")); | ||
| 3099 | |||
| 3100 | Fput (Qtext_read_only, Qerror_conditions, | ||
| 3101 | pure_cons (Qtext_read_only, error_tail)); | ||
| 3102 | Fput (Qtext_read_only, Qerror_message, | ||
| 3103 | make_pure_c_string ("Text is read-only")); | ||
| 3104 | 3045 | ||
| 3105 | DEFSYM (Qrange_error, "range-error"); | 3046 | DEFSYM (Qrange_error, "range-error"); |
| 3106 | DEFSYM (Qdomain_error, "domain-error"); | 3047 | DEFSYM (Qdomain_error, "domain-error"); |
| @@ -3108,30 +3049,17 @@ syms_of_data (void) | |||
| 3108 | DEFSYM (Qoverflow_error, "overflow-error"); | 3049 | DEFSYM (Qoverflow_error, "overflow-error"); |
| 3109 | DEFSYM (Qunderflow_error, "underflow-error"); | 3050 | DEFSYM (Qunderflow_error, "underflow-error"); |
| 3110 | 3051 | ||
| 3111 | Fput (Qdomain_error, Qerror_conditions, | 3052 | PUT_ERROR (Qdomain_error, arith_tail, "Arithmetic domain error"); |
| 3112 | pure_cons (Qdomain_error, arith_tail)); | 3053 | |
| 3113 | Fput (Qdomain_error, Qerror_message, | 3054 | PUT_ERROR (Qrange_error, arith_tail, "Arithmetic range error"); |
| 3114 | make_pure_c_string ("Arithmetic domain error")); | 3055 | |
| 3115 | 3056 | PUT_ERROR (Qsingularity_error, Fcons (Qdomain_error, arith_tail), | |
| 3116 | Fput (Qrange_error, Qerror_conditions, | 3057 | "Arithmetic singularity error"); |
| 3117 | pure_cons (Qrange_error, arith_tail)); | 3058 | |
| 3118 | Fput (Qrange_error, Qerror_message, | 3059 | PUT_ERROR (Qoverflow_error, Fcons (Qdomain_error, arith_tail), |
| 3119 | make_pure_c_string ("Arithmetic range error")); | 3060 | "Arithmetic overflow error"); |
| 3120 | 3061 | PUT_ERROR (Qunderflow_error, Fcons (Qdomain_error, arith_tail), | |
| 3121 | Fput (Qsingularity_error, Qerror_conditions, | 3062 | "Arithmetic underflow error"); |
| 3122 | pure_cons (Qsingularity_error, Fcons (Qdomain_error, arith_tail))); | ||
| 3123 | Fput (Qsingularity_error, Qerror_message, | ||
| 3124 | make_pure_c_string ("Arithmetic singularity error")); | ||
| 3125 | |||
| 3126 | Fput (Qoverflow_error, Qerror_conditions, | ||
| 3127 | pure_cons (Qoverflow_error, Fcons (Qdomain_error, arith_tail))); | ||
| 3128 | Fput (Qoverflow_error, Qerror_message, | ||
| 3129 | make_pure_c_string ("Arithmetic overflow error")); | ||
| 3130 | |||
| 3131 | Fput (Qunderflow_error, Qerror_conditions, | ||
| 3132 | pure_cons (Qunderflow_error, Fcons (Qdomain_error, arith_tail))); | ||
| 3133 | Fput (Qunderflow_error, Qerror_message, | ||
| 3134 | make_pure_c_string ("Arithmetic underflow error")); | ||
| 3135 | 3063 | ||
| 3136 | staticpro (&Qnil); | 3064 | staticpro (&Qnil); |
| 3137 | staticpro (&Qt); | 3065 | staticpro (&Qt); |