diff options
| author | Joakim Verona | 2012-05-21 00:37:29 +0200 |
|---|---|---|
| committer | Joakim Verona | 2012-05-21 00:37:29 +0200 |
| commit | 74f082445c1dd0c92d5bb187db0d50287e3a7bae (patch) | |
| tree | 48e3d8fd9df3876665654eab9bcf96ec492a31e9 /src/data.c | |
| parent | 52862ad482e030e4d54cd7d6e250d76e59ee0554 (diff) | |
| parent | 1b170bc63c2f3a3fbe6ba6996d5a015e82634909 (diff) | |
| download | emacs-74f082445c1dd0c92d5bb187db0d50287e3a7bae.tar.gz emacs-74f082445c1dd0c92d5bb187db0d50287e3a7bae.zip | |
upstream, fix conflicts
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 bd1d89992cb..feacea2c08b 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; |
| @@ -2937,6 +2937,7 @@ syms_of_data (void) | |||
| 2937 | DEFSYM (Qtop_level, "top-level"); | 2937 | DEFSYM (Qtop_level, "top-level"); |
| 2938 | 2938 | ||
| 2939 | DEFSYM (Qerror, "error"); | 2939 | DEFSYM (Qerror, "error"); |
| 2940 | DEFSYM (Quser_error, "user-error"); | ||
| 2940 | DEFSYM (Qquit, "quit"); | 2941 | DEFSYM (Qquit, "quit"); |
| 2941 | DEFSYM (Qwrong_type_argument, "wrong-type-argument"); | 2942 | DEFSYM (Qwrong_type_argument, "wrong-type-argument"); |
| 2942 | DEFSYM (Qargs_out_of_range, "args-out-of-range"); | 2943 | DEFSYM (Qargs_out_of_range, "args-out-of-range"); |
| @@ -3004,102 +3005,42 @@ syms_of_data (void) | |||
| 3004 | Fput (Qerror, Qerror_message, | 3005 | Fput (Qerror, Qerror_message, |
| 3005 | make_pure_c_string ("error")); | 3006 | make_pure_c_string ("error")); |
| 3006 | 3007 | ||
| 3007 | Fput (Qquit, Qerror_conditions, | 3008 | #define PUT_ERROR(sym, tail, msg) \ |
| 3008 | pure_cons (Qquit, Qnil)); | 3009 | Fput (sym, Qerror_conditions, pure_cons (sym, tail)); \ |
| 3009 | Fput (Qquit, Qerror_message, | 3010 | Fput (sym, Qerror_message, make_pure_c_string (msg)) |
| 3010 | make_pure_c_string ("Quit")); | 3011 | |
| 3011 | 3012 | PUT_ERROR (Qquit, Qnil, "Quit"); | |
| 3012 | Fput (Qwrong_type_argument, Qerror_conditions, | 3013 | |
| 3013 | pure_cons (Qwrong_type_argument, error_tail)); | 3014 | PUT_ERROR (Quser_error, error_tail, ""); |
| 3014 | Fput (Qwrong_type_argument, Qerror_message, | 3015 | PUT_ERROR (Qwrong_type_argument, error_tail, "Wrong type argument"); |
| 3015 | make_pure_c_string ("Wrong type argument")); | 3016 | PUT_ERROR (Qargs_out_of_range, error_tail, "Args out of range"); |
| 3016 | 3017 | PUT_ERROR (Qvoid_function, error_tail, | |
| 3017 | Fput (Qargs_out_of_range, Qerror_conditions, | 3018 | "Symbol's function definition is void"); |
| 3018 | pure_cons (Qargs_out_of_range, error_tail)); | 3019 | PUT_ERROR (Qcyclic_function_indirection, error_tail, |
| 3019 | Fput (Qargs_out_of_range, Qerror_message, | 3020 | "Symbol's chain of function indirections contains a loop"); |
| 3020 | make_pure_c_string ("Args out of range")); | 3021 | PUT_ERROR (Qcyclic_variable_indirection, error_tail, |
| 3021 | 3022 | "Symbol's chain of variable indirections contains a loop"); | |
| 3022 | Fput (Qvoid_function, Qerror_conditions, | ||
| 3023 | pure_cons (Qvoid_function, error_tail)); | ||
| 3024 | Fput (Qvoid_function, Qerror_message, | ||
| 3025 | make_pure_c_string ("Symbol's function definition is void")); | ||
| 3026 | |||
| 3027 | Fput (Qcyclic_function_indirection, Qerror_conditions, | ||
| 3028 | pure_cons (Qcyclic_function_indirection, error_tail)); | ||
| 3029 | Fput (Qcyclic_function_indirection, Qerror_message, | ||
| 3030 | make_pure_c_string ("Symbol's chain of function indirections contains a loop")); | ||
| 3031 | |||
| 3032 | Fput (Qcyclic_variable_indirection, Qerror_conditions, | ||
| 3033 | pure_cons (Qcyclic_variable_indirection, error_tail)); | ||
| 3034 | Fput (Qcyclic_variable_indirection, Qerror_message, | ||
| 3035 | make_pure_c_string ("Symbol's chain of variable indirections contains a loop")); | ||
| 3036 | |||
| 3037 | DEFSYM (Qcircular_list, "circular-list"); | 3023 | DEFSYM (Qcircular_list, "circular-list"); |
| 3038 | Fput (Qcircular_list, Qerror_conditions, | 3024 | PUT_ERROR (Qcircular_list, error_tail, "List contains a loop"); |
| 3039 | pure_cons (Qcircular_list, error_tail)); | 3025 | PUT_ERROR (Qvoid_variable, error_tail, "Symbol's value as variable is void"); |
| 3040 | Fput (Qcircular_list, Qerror_message, | 3026 | PUT_ERROR (Qsetting_constant, error_tail, |
| 3041 | make_pure_c_string ("List contains a loop")); | 3027 | "Attempt to set a constant symbol"); |
| 3042 | 3028 | PUT_ERROR (Qinvalid_read_syntax, error_tail, "Invalid read syntax"); | |
| 3043 | Fput (Qvoid_variable, Qerror_conditions, | 3029 | PUT_ERROR (Qinvalid_function, error_tail, "Invalid function"); |
| 3044 | pure_cons (Qvoid_variable, error_tail)); | 3030 | PUT_ERROR (Qwrong_number_of_arguments, error_tail, |
| 3045 | Fput (Qvoid_variable, Qerror_message, | 3031 | "Wrong number of arguments"); |
| 3046 | make_pure_c_string ("Symbol's value as variable is void")); | 3032 | PUT_ERROR (Qno_catch, error_tail, "No catch for tag"); |
| 3047 | 3033 | PUT_ERROR (Qend_of_file, error_tail, "End of file during parsing"); | |
| 3048 | Fput (Qsetting_constant, Qerror_conditions, | ||
| 3049 | pure_cons (Qsetting_constant, error_tail)); | ||
| 3050 | Fput (Qsetting_constant, Qerror_message, | ||
| 3051 | make_pure_c_string ("Attempt to set a constant symbol")); | ||
| 3052 | |||
| 3053 | Fput (Qinvalid_read_syntax, Qerror_conditions, | ||
| 3054 | pure_cons (Qinvalid_read_syntax, error_tail)); | ||
| 3055 | Fput (Qinvalid_read_syntax, Qerror_message, | ||
| 3056 | make_pure_c_string ("Invalid read syntax")); | ||
| 3057 | |||
| 3058 | Fput (Qinvalid_function, Qerror_conditions, | ||
| 3059 | pure_cons (Qinvalid_function, error_tail)); | ||
| 3060 | Fput (Qinvalid_function, Qerror_message, | ||
| 3061 | make_pure_c_string ("Invalid function")); | ||
| 3062 | |||
| 3063 | Fput (Qwrong_number_of_arguments, Qerror_conditions, | ||
| 3064 | pure_cons (Qwrong_number_of_arguments, error_tail)); | ||
| 3065 | Fput (Qwrong_number_of_arguments, Qerror_message, | ||
| 3066 | make_pure_c_string ("Wrong number of arguments")); | ||
| 3067 | |||
| 3068 | Fput (Qno_catch, Qerror_conditions, | ||
| 3069 | pure_cons (Qno_catch, error_tail)); | ||
| 3070 | Fput (Qno_catch, Qerror_message, | ||
| 3071 | make_pure_c_string ("No catch for tag")); | ||
| 3072 | |||
| 3073 | Fput (Qend_of_file, Qerror_conditions, | ||
| 3074 | pure_cons (Qend_of_file, error_tail)); | ||
| 3075 | Fput (Qend_of_file, Qerror_message, | ||
| 3076 | make_pure_c_string ("End of file during parsing")); | ||
| 3077 | 3034 | ||
| 3078 | arith_tail = pure_cons (Qarith_error, error_tail); | 3035 | arith_tail = pure_cons (Qarith_error, error_tail); |
| 3079 | Fput (Qarith_error, Qerror_conditions, | 3036 | Fput (Qarith_error, Qerror_conditions, arith_tail); |
| 3080 | arith_tail); | 3037 | Fput (Qarith_error, Qerror_message, make_pure_c_string ("Arithmetic error")); |
| 3081 | Fput (Qarith_error, Qerror_message, | 3038 | |
| 3082 | make_pure_c_string ("Arithmetic error")); | 3039 | PUT_ERROR (Qbeginning_of_buffer, error_tail, "Beginning of buffer"); |
| 3083 | 3040 | PUT_ERROR (Qend_of_buffer, error_tail, "End of buffer"); | |
| 3084 | Fput (Qbeginning_of_buffer, Qerror_conditions, | 3041 | PUT_ERROR (Qbuffer_read_only, error_tail, "Buffer is read-only"); |
| 3085 | pure_cons (Qbeginning_of_buffer, error_tail)); | 3042 | PUT_ERROR (Qtext_read_only, pure_cons (Qbuffer_read_only, error_tail), |
| 3086 | Fput (Qbeginning_of_buffer, Qerror_message, | 3043 | "Text is read-only"); |
| 3087 | make_pure_c_string ("Beginning of buffer")); | ||
| 3088 | |||
| 3089 | Fput (Qend_of_buffer, Qerror_conditions, | ||
| 3090 | pure_cons (Qend_of_buffer, error_tail)); | ||
| 3091 | Fput (Qend_of_buffer, Qerror_message, | ||
| 3092 | make_pure_c_string ("End of buffer")); | ||
| 3093 | |||
| 3094 | Fput (Qbuffer_read_only, Qerror_conditions, | ||
| 3095 | pure_cons (Qbuffer_read_only, error_tail)); | ||
| 3096 | Fput (Qbuffer_read_only, Qerror_message, | ||
| 3097 | make_pure_c_string ("Buffer is read-only")); | ||
| 3098 | |||
| 3099 | Fput (Qtext_read_only, Qerror_conditions, | ||
| 3100 | pure_cons (Qtext_read_only, error_tail)); | ||
| 3101 | Fput (Qtext_read_only, Qerror_message, | ||
| 3102 | make_pure_c_string ("Text is read-only")); | ||
| 3103 | 3044 | ||
| 3104 | DEFSYM (Qrange_error, "range-error"); | 3045 | DEFSYM (Qrange_error, "range-error"); |
| 3105 | DEFSYM (Qdomain_error, "domain-error"); | 3046 | DEFSYM (Qdomain_error, "domain-error"); |
| @@ -3107,30 +3048,17 @@ syms_of_data (void) | |||
| 3107 | DEFSYM (Qoverflow_error, "overflow-error"); | 3048 | DEFSYM (Qoverflow_error, "overflow-error"); |
| 3108 | DEFSYM (Qunderflow_error, "underflow-error"); | 3049 | DEFSYM (Qunderflow_error, "underflow-error"); |
| 3109 | 3050 | ||
| 3110 | Fput (Qdomain_error, Qerror_conditions, | 3051 | PUT_ERROR (Qdomain_error, arith_tail, "Arithmetic domain error"); |
| 3111 | pure_cons (Qdomain_error, arith_tail)); | 3052 | |
| 3112 | Fput (Qdomain_error, Qerror_message, | 3053 | PUT_ERROR (Qrange_error, arith_tail, "Arithmetic range error"); |
| 3113 | make_pure_c_string ("Arithmetic domain error")); | 3054 | |
| 3114 | 3055 | PUT_ERROR (Qsingularity_error, Fcons (Qdomain_error, arith_tail), | |
| 3115 | Fput (Qrange_error, Qerror_conditions, | 3056 | "Arithmetic singularity error"); |
| 3116 | pure_cons (Qrange_error, arith_tail)); | 3057 | |
| 3117 | Fput (Qrange_error, Qerror_message, | 3058 | PUT_ERROR (Qoverflow_error, Fcons (Qdomain_error, arith_tail), |
| 3118 | make_pure_c_string ("Arithmetic range error")); | 3059 | "Arithmetic overflow error"); |
| 3119 | 3060 | PUT_ERROR (Qunderflow_error, Fcons (Qdomain_error, arith_tail), | |
| 3120 | Fput (Qsingularity_error, Qerror_conditions, | 3061 | "Arithmetic underflow error"); |
| 3121 | pure_cons (Qsingularity_error, Fcons (Qdomain_error, arith_tail))); | ||
| 3122 | Fput (Qsingularity_error, Qerror_message, | ||
| 3123 | make_pure_c_string ("Arithmetic singularity error")); | ||
| 3124 | |||
| 3125 | Fput (Qoverflow_error, Qerror_conditions, | ||
| 3126 | pure_cons (Qoverflow_error, Fcons (Qdomain_error, arith_tail))); | ||
| 3127 | Fput (Qoverflow_error, Qerror_message, | ||
| 3128 | make_pure_c_string ("Arithmetic overflow error")); | ||
| 3129 | |||
| 3130 | Fput (Qunderflow_error, Qerror_conditions, | ||
| 3131 | pure_cons (Qunderflow_error, Fcons (Qdomain_error, arith_tail))); | ||
| 3132 | Fput (Qunderflow_error, Qerror_message, | ||
| 3133 | make_pure_c_string ("Arithmetic underflow error")); | ||
| 3134 | 3062 | ||
| 3135 | staticpro (&Qnil); | 3063 | staticpro (&Qnil); |
| 3136 | staticpro (&Qt); | 3064 | staticpro (&Qt); |