diff options
Diffstat (limited to 'src/data.c')
| -rw-r--r-- | src/data.c | 269 |
1 files changed, 93 insertions, 176 deletions
diff --git a/src/data.c b/src/data.c index a26627875ab..443d78376d9 100644 --- a/src/data.c +++ b/src/data.c | |||
| @@ -32,14 +32,14 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 32 | #include "keyboard.h" | 32 | #include "keyboard.h" |
| 33 | #include "frame.h" | 33 | #include "frame.h" |
| 34 | #include "syssignal.h" | 34 | #include "syssignal.h" |
| 35 | #include "termhooks.h" /* For FRAME_KBOARD reference in y-or-n-p. */ | 35 | #include "termhooks.h" /* For FRAME_KBOARD reference in y-or-n-p. */ |
| 36 | #include "font.h" | 36 | #include "font.h" |
| 37 | 37 | ||
| 38 | #ifdef STDC_HEADERS | 38 | #ifdef STDC_HEADERS |
| 39 | #include <float.h> | 39 | #include <float.h> |
| 40 | #endif | 40 | #endif |
| 41 | 41 | ||
| 42 | /* If IEEE_FLOATING_POINT isn't defined, default it from FLT_*. */ | 42 | /* If IEEE_FLOATING_POINT isn't defined, default it from FLT_*. */ |
| 43 | #ifndef IEEE_FLOATING_POINT | 43 | #ifndef IEEE_FLOATING_POINT |
| 44 | #if (FLT_RADIX == 2 && FLT_MANT_DIG == 24 \ | 44 | #if (FLT_RADIX == 2 && FLT_MANT_DIG == 24 \ |
| 45 | && FLT_MIN_EXP == -125 && FLT_MAX_EXP == 128) | 45 | && FLT_MIN_EXP == -125 && FLT_MAX_EXP == 128) |
| @@ -90,7 +90,7 @@ static Lisp_Object Qsymbol, Qstring, Qcons, Qmarker, Qoverlay; | |||
| 90 | Lisp_Object Qwindow; | 90 | Lisp_Object Qwindow; |
| 91 | static Lisp_Object Qfloat, Qwindow_configuration; | 91 | static Lisp_Object Qfloat, Qwindow_configuration; |
| 92 | static Lisp_Object Qprocess; | 92 | static Lisp_Object Qprocess; |
| 93 | static Lisp_Object Qcompiled_function, Qbuffer, Qframe, Qvector; | 93 | Lisp_Object Qcompiled_function, Qbuffer, Qframe, Qvector; |
| 94 | static Lisp_Object Qchar_table, Qbool_vector, Qhash_table; | 94 | static Lisp_Object Qchar_table, Qbool_vector, Qhash_table; |
| 95 | static Lisp_Object Qsubrp, Qmany, Qunevalled; | 95 | static Lisp_Object Qsubrp, Qmany, Qunevalled; |
| 96 | Lisp_Object Qfont_spec, Qfont_entity, Qfont_object; | 96 | Lisp_Object Qfont_spec, Qfont_entity, Qfont_object; |
| @@ -2854,74 +2854,75 @@ syms_of_data (void) | |||
| 2854 | { | 2854 | { |
| 2855 | Lisp_Object error_tail, arith_tail; | 2855 | Lisp_Object error_tail, arith_tail; |
| 2856 | 2856 | ||
| 2857 | Qquote = intern_c_string ("quote"); | 2857 | DEFSYM (Qquote, "quote"); |
| 2858 | Qlambda = intern_c_string ("lambda"); | 2858 | DEFSYM (Qlambda, "lambda"); |
| 2859 | Qsubr = intern_c_string ("subr"); | 2859 | DEFSYM (Qsubr, "subr"); |
| 2860 | Qerror_conditions = intern_c_string ("error-conditions"); | 2860 | DEFSYM (Qerror_conditions, "error-conditions"); |
| 2861 | Qerror_message = intern_c_string ("error-message"); | 2861 | DEFSYM (Qerror_message, "error-message"); |
| 2862 | Qtop_level = intern_c_string ("top-level"); | 2862 | DEFSYM (Qtop_level, "top-level"); |
| 2863 | 2863 | ||
| 2864 | Qerror = intern_c_string ("error"); | 2864 | DEFSYM (Qerror, "error"); |
| 2865 | Qquit = intern_c_string ("quit"); | 2865 | DEFSYM (Qquit, "quit"); |
| 2866 | Qwrong_type_argument = intern_c_string ("wrong-type-argument"); | 2866 | DEFSYM (Qwrong_type_argument, "wrong-type-argument"); |
| 2867 | Qargs_out_of_range = intern_c_string ("args-out-of-range"); | 2867 | DEFSYM (Qargs_out_of_range, "args-out-of-range"); |
| 2868 | Qvoid_function = intern_c_string ("void-function"); | 2868 | DEFSYM (Qvoid_function, "void-function"); |
| 2869 | Qcyclic_function_indirection = intern_c_string ("cyclic-function-indirection"); | 2869 | DEFSYM (Qcyclic_function_indirection, "cyclic-function-indirection"); |
| 2870 | Qcyclic_variable_indirection = intern_c_string ("cyclic-variable-indirection"); | 2870 | DEFSYM (Qcyclic_variable_indirection, "cyclic-variable-indirection"); |
| 2871 | Qvoid_variable = intern_c_string ("void-variable"); | 2871 | DEFSYM (Qvoid_variable, "void-variable"); |
| 2872 | Qsetting_constant = intern_c_string ("setting-constant"); | 2872 | DEFSYM (Qsetting_constant, "setting-constant"); |
| 2873 | Qinvalid_read_syntax = intern_c_string ("invalid-read-syntax"); | 2873 | DEFSYM (Qinvalid_read_syntax, "invalid-read-syntax"); |
| 2874 | 2874 | ||
| 2875 | Qinvalid_function = intern_c_string ("invalid-function"); | 2875 | DEFSYM (Qinvalid_function, "invalid-function"); |
| 2876 | Qwrong_number_of_arguments = intern_c_string ("wrong-number-of-arguments"); | 2876 | DEFSYM (Qwrong_number_of_arguments, "wrong-number-of-arguments"); |
| 2877 | Qno_catch = intern_c_string ("no-catch"); | 2877 | DEFSYM (Qno_catch, "no-catch"); |
| 2878 | Qend_of_file = intern_c_string ("end-of-file"); | 2878 | DEFSYM (Qend_of_file, "end-of-file"); |
| 2879 | Qarith_error = intern_c_string ("arith-error"); | 2879 | DEFSYM (Qarith_error, "arith-error"); |
| 2880 | Qbeginning_of_buffer = intern_c_string ("beginning-of-buffer"); | 2880 | DEFSYM (Qbeginning_of_buffer, "beginning-of-buffer"); |
| 2881 | Qend_of_buffer = intern_c_string ("end-of-buffer"); | 2881 | DEFSYM (Qend_of_buffer, "end-of-buffer"); |
| 2882 | Qbuffer_read_only = intern_c_string ("buffer-read-only"); | 2882 | DEFSYM (Qbuffer_read_only, "buffer-read-only"); |
| 2883 | Qtext_read_only = intern_c_string ("text-read-only"); | 2883 | DEFSYM (Qtext_read_only, "text-read-only"); |
| 2884 | Qmark_inactive = intern_c_string ("mark-inactive"); | 2884 | DEFSYM (Qmark_inactive, "mark-inactive"); |
| 2885 | 2885 | ||
| 2886 | Qlistp = intern_c_string ("listp"); | 2886 | DEFSYM (Qlistp, "listp"); |
| 2887 | Qconsp = intern_c_string ("consp"); | 2887 | DEFSYM (Qconsp, "consp"); |
| 2888 | Qsymbolp = intern_c_string ("symbolp"); | 2888 | DEFSYM (Qsymbolp, "symbolp"); |
| 2889 | Qkeywordp = intern_c_string ("keywordp"); | 2889 | DEFSYM (Qkeywordp, "keywordp"); |
| 2890 | Qintegerp = intern_c_string ("integerp"); | 2890 | DEFSYM (Qintegerp, "integerp"); |
| 2891 | Qnatnump = intern_c_string ("natnump"); | 2891 | DEFSYM (Qnatnump, "natnump"); |
| 2892 | Qwholenump = intern_c_string ("wholenump"); | 2892 | DEFSYM (Qwholenump, "wholenump"); |
| 2893 | Qstringp = intern_c_string ("stringp"); | 2893 | DEFSYM (Qstringp, "stringp"); |
| 2894 | Qarrayp = intern_c_string ("arrayp"); | 2894 | DEFSYM (Qarrayp, "arrayp"); |
| 2895 | Qsequencep = intern_c_string ("sequencep"); | 2895 | DEFSYM (Qsequencep, "sequencep"); |
| 2896 | Qbufferp = intern_c_string ("bufferp"); | 2896 | DEFSYM (Qbufferp, "bufferp"); |
| 2897 | Qvectorp = intern_c_string ("vectorp"); | 2897 | DEFSYM (Qvectorp, "vectorp"); |
| 2898 | Qchar_or_string_p = intern_c_string ("char-or-string-p"); | 2898 | DEFSYM (Qchar_or_string_p, "char-or-string-p"); |
| 2899 | Qmarkerp = intern_c_string ("markerp"); | 2899 | DEFSYM (Qmarkerp, "markerp"); |
| 2900 | Qbuffer_or_string_p = intern_c_string ("buffer-or-string-p"); | 2900 | DEFSYM (Qbuffer_or_string_p, "buffer-or-string-p"); |
| 2901 | Qinteger_or_marker_p = intern_c_string ("integer-or-marker-p"); | 2901 | DEFSYM (Qinteger_or_marker_p, "integer-or-marker-p"); |
| 2902 | Qboundp = intern_c_string ("boundp"); | 2902 | DEFSYM (Qboundp, "boundp"); |
| 2903 | Qfboundp = intern_c_string ("fboundp"); | 2903 | DEFSYM (Qfboundp, "fboundp"); |
| 2904 | 2904 | ||
| 2905 | Qfloatp = intern_c_string ("floatp"); | 2905 | DEFSYM (Qfloatp, "floatp"); |
| 2906 | Qnumberp = intern_c_string ("numberp"); | 2906 | DEFSYM (Qnumberp, "numberp"); |
| 2907 | Qnumber_or_marker_p = intern_c_string ("number-or-marker-p"); | 2907 | DEFSYM (Qnumber_or_marker_p, "number-or-marker-p"); |
| 2908 | 2908 | ||
| 2909 | Qchar_table_p = intern_c_string ("char-table-p"); | 2909 | DEFSYM (Qchar_table_p, "char-table-p"); |
| 2910 | Qvector_or_char_table_p = intern_c_string ("vector-or-char-table-p"); | 2910 | DEFSYM (Qvector_or_char_table_p, "vector-or-char-table-p"); |
| 2911 | 2911 | ||
| 2912 | Qsubrp = intern_c_string ("subrp"); | 2912 | DEFSYM (Qsubrp, "subrp"); |
| 2913 | Qunevalled = intern_c_string ("unevalled"); | 2913 | DEFSYM (Qunevalled, "unevalled"); |
| 2914 | Qmany = intern_c_string ("many"); | 2914 | DEFSYM (Qmany, "many"); |
| 2915 | 2915 | ||
| 2916 | Qcdr = intern_c_string ("cdr"); | 2916 | DEFSYM (Qcdr, "cdr"); |
| 2917 | 2917 | ||
| 2918 | /* Handle automatic advice activation */ | 2918 | /* Handle automatic advice activation. */ |
| 2919 | Qad_advice_info = intern_c_string ("ad-advice-info"); | 2919 | DEFSYM (Qad_advice_info, "ad-advice-info"); |
| 2920 | Qad_activate_internal = intern_c_string ("ad-activate-internal"); | 2920 | DEFSYM (Qad_activate_internal, "ad-activate-internal"); |
| 2921 | 2921 | ||
| 2922 | error_tail = pure_cons (Qerror, Qnil); | 2922 | error_tail = pure_cons (Qerror, Qnil); |
| 2923 | 2923 | ||
| 2924 | /* ERROR is used as a signaler for random errors for which nothing else is right */ | 2924 | /* ERROR is used as a signaler for random errors for which nothing else is |
| 2925 | right. */ | ||
| 2925 | 2926 | ||
| 2926 | Fput (Qerror, Qerror_conditions, | 2927 | Fput (Qerror, Qerror_conditions, |
| 2927 | error_tail); | 2928 | error_tail); |
| @@ -2958,8 +2959,7 @@ syms_of_data (void) | |||
| 2958 | Fput (Qcyclic_variable_indirection, Qerror_message, | 2959 | Fput (Qcyclic_variable_indirection, Qerror_message, |
| 2959 | make_pure_c_string ("Symbol's chain of variable indirections contains a loop")); | 2960 | make_pure_c_string ("Symbol's chain of variable indirections contains a loop")); |
| 2960 | 2961 | ||
| 2961 | Qcircular_list = intern_c_string ("circular-list"); | 2962 | DEFSYM (Qcircular_list, "circular-list"); |
| 2962 | staticpro (&Qcircular_list); | ||
| 2963 | Fput (Qcircular_list, Qerror_conditions, | 2963 | Fput (Qcircular_list, Qerror_conditions, |
| 2964 | pure_cons (Qcircular_list, error_tail)); | 2964 | pure_cons (Qcircular_list, error_tail)); |
| 2965 | Fput (Qcircular_list, Qerror_message, | 2965 | Fput (Qcircular_list, Qerror_message, |
| @@ -3026,11 +3026,11 @@ syms_of_data (void) | |||
| 3026 | Fput (Qtext_read_only, Qerror_message, | 3026 | Fput (Qtext_read_only, Qerror_message, |
| 3027 | make_pure_c_string ("Text is read-only")); | 3027 | make_pure_c_string ("Text is read-only")); |
| 3028 | 3028 | ||
| 3029 | Qrange_error = intern_c_string ("range-error"); | 3029 | DEFSYM (Qrange_error, "range-error"); |
| 3030 | Qdomain_error = intern_c_string ("domain-error"); | 3030 | DEFSYM (Qdomain_error, "domain-error"); |
| 3031 | Qsingularity_error = intern_c_string ("singularity-error"); | 3031 | DEFSYM (Qsingularity_error, "singularity-error"); |
| 3032 | Qoverflow_error = intern_c_string ("overflow-error"); | 3032 | DEFSYM (Qoverflow_error, "overflow-error"); |
| 3033 | Qunderflow_error = intern_c_string ("underflow-error"); | 3033 | DEFSYM (Qunderflow_error, "underflow-error"); |
| 3034 | 3034 | ||
| 3035 | Fput (Qdomain_error, Qerror_conditions, | 3035 | Fput (Qdomain_error, Qerror_conditions, |
| 3036 | pure_cons (Qdomain_error, arith_tail)); | 3036 | pure_cons (Qdomain_error, arith_tail)); |
| @@ -3057,93 +3057,29 @@ syms_of_data (void) | |||
| 3057 | Fput (Qunderflow_error, Qerror_message, | 3057 | Fput (Qunderflow_error, Qerror_message, |
| 3058 | make_pure_c_string ("Arithmetic underflow error")); | 3058 | make_pure_c_string ("Arithmetic underflow error")); |
| 3059 | 3059 | ||
| 3060 | staticpro (&Qrange_error); | ||
| 3061 | staticpro (&Qdomain_error); | ||
| 3062 | staticpro (&Qsingularity_error); | ||
| 3063 | staticpro (&Qoverflow_error); | ||
| 3064 | staticpro (&Qunderflow_error); | ||
| 3065 | |||
| 3066 | staticpro (&Qnil); | 3060 | staticpro (&Qnil); |
| 3067 | staticpro (&Qt); | 3061 | staticpro (&Qt); |
| 3068 | staticpro (&Qquote); | ||
| 3069 | staticpro (&Qlambda); | ||
| 3070 | staticpro (&Qsubr); | ||
| 3071 | staticpro (&Qunbound); | 3062 | staticpro (&Qunbound); |
| 3072 | staticpro (&Qerror_conditions); | ||
| 3073 | staticpro (&Qerror_message); | ||
| 3074 | staticpro (&Qtop_level); | ||
| 3075 | |||
| 3076 | staticpro (&Qerror); | ||
| 3077 | staticpro (&Qquit); | ||
| 3078 | staticpro (&Qwrong_type_argument); | ||
| 3079 | staticpro (&Qargs_out_of_range); | ||
| 3080 | staticpro (&Qvoid_function); | ||
| 3081 | staticpro (&Qcyclic_function_indirection); | ||
| 3082 | staticpro (&Qcyclic_variable_indirection); | ||
| 3083 | staticpro (&Qvoid_variable); | ||
| 3084 | staticpro (&Qsetting_constant); | ||
| 3085 | staticpro (&Qinvalid_read_syntax); | ||
| 3086 | staticpro (&Qwrong_number_of_arguments); | ||
| 3087 | staticpro (&Qinvalid_function); | ||
| 3088 | staticpro (&Qno_catch); | ||
| 3089 | staticpro (&Qend_of_file); | ||
| 3090 | staticpro (&Qarith_error); | ||
| 3091 | staticpro (&Qbeginning_of_buffer); | ||
| 3092 | staticpro (&Qend_of_buffer); | ||
| 3093 | staticpro (&Qbuffer_read_only); | ||
| 3094 | staticpro (&Qtext_read_only); | ||
| 3095 | staticpro (&Qmark_inactive); | ||
| 3096 | |||
| 3097 | staticpro (&Qlistp); | ||
| 3098 | staticpro (&Qconsp); | ||
| 3099 | staticpro (&Qsymbolp); | ||
| 3100 | staticpro (&Qkeywordp); | ||
| 3101 | staticpro (&Qintegerp); | ||
| 3102 | staticpro (&Qnatnump); | ||
| 3103 | staticpro (&Qwholenump); | ||
| 3104 | staticpro (&Qstringp); | ||
| 3105 | staticpro (&Qarrayp); | ||
| 3106 | staticpro (&Qsequencep); | ||
| 3107 | staticpro (&Qbufferp); | ||
| 3108 | staticpro (&Qvectorp); | ||
| 3109 | staticpro (&Qchar_or_string_p); | ||
| 3110 | staticpro (&Qmarkerp); | ||
| 3111 | staticpro (&Qbuffer_or_string_p); | ||
| 3112 | staticpro (&Qinteger_or_marker_p); | ||
| 3113 | staticpro (&Qfloatp); | ||
| 3114 | staticpro (&Qnumberp); | ||
| 3115 | staticpro (&Qnumber_or_marker_p); | ||
| 3116 | staticpro (&Qchar_table_p); | ||
| 3117 | staticpro (&Qvector_or_char_table_p); | ||
| 3118 | staticpro (&Qsubrp); | ||
| 3119 | staticpro (&Qmany); | ||
| 3120 | staticpro (&Qunevalled); | ||
| 3121 | |||
| 3122 | staticpro (&Qboundp); | ||
| 3123 | staticpro (&Qfboundp); | ||
| 3124 | staticpro (&Qcdr); | ||
| 3125 | staticpro (&Qad_advice_info); | ||
| 3126 | staticpro (&Qad_activate_internal); | ||
| 3127 | 3063 | ||
| 3128 | /* Types that type-of returns. */ | 3064 | /* Types that type-of returns. */ |
| 3129 | Qinteger = intern_c_string ("integer"); | 3065 | DEFSYM (Qinteger, "integer"); |
| 3130 | Qsymbol = intern_c_string ("symbol"); | 3066 | DEFSYM (Qsymbol, "symbol"); |
| 3131 | Qstring = intern_c_string ("string"); | 3067 | DEFSYM (Qstring, "string"); |
| 3132 | Qcons = intern_c_string ("cons"); | 3068 | DEFSYM (Qcons, "cons"); |
| 3133 | Qmarker = intern_c_string ("marker"); | 3069 | DEFSYM (Qmarker, "marker"); |
| 3134 | Qoverlay = intern_c_string ("overlay"); | 3070 | DEFSYM (Qoverlay, "overlay"); |
| 3135 | Qfloat = intern_c_string ("float"); | 3071 | DEFSYM (Qfloat, "float"); |
| 3136 | Qwindow_configuration = intern_c_string ("window-configuration"); | 3072 | DEFSYM (Qwindow_configuration, "window-configuration"); |
| 3137 | Qprocess = intern_c_string ("process"); | 3073 | DEFSYM (Qprocess, "process"); |
| 3138 | Qwindow = intern_c_string ("window"); | 3074 | DEFSYM (Qwindow, "window"); |
| 3139 | /* Qsubr = intern_c_string ("subr"); */ | 3075 | /* DEFSYM (Qsubr, "subr"); */ |
| 3140 | Qcompiled_function = intern_c_string ("compiled-function"); | 3076 | DEFSYM (Qcompiled_function, "compiled-function"); |
| 3141 | Qbuffer = intern_c_string ("buffer"); | 3077 | DEFSYM (Qbuffer, "buffer"); |
| 3142 | Qframe = intern_c_string ("frame"); | 3078 | DEFSYM (Qframe, "frame"); |
| 3143 | Qvector = intern_c_string ("vector"); | 3079 | DEFSYM (Qvector, "vector"); |
| 3144 | Qchar_table = intern_c_string ("char-table"); | 3080 | DEFSYM (Qchar_table, "char-table"); |
| 3145 | Qbool_vector = intern_c_string ("bool-vector"); | 3081 | DEFSYM (Qbool_vector, "bool-vector"); |
| 3146 | Qhash_table = intern_c_string ("hash-table"); | 3082 | DEFSYM (Qhash_table, "hash-table"); |
| 3147 | 3083 | ||
| 3148 | DEFSYM (Qfont_spec, "font-spec"); | 3084 | DEFSYM (Qfont_spec, "font-spec"); |
| 3149 | DEFSYM (Qfont_entity, "font-entity"); | 3085 | DEFSYM (Qfont_entity, "font-entity"); |
| @@ -3151,25 +3087,6 @@ syms_of_data (void) | |||
| 3151 | 3087 | ||
| 3152 | DEFSYM (Qinteractive_form, "interactive-form"); | 3088 | DEFSYM (Qinteractive_form, "interactive-form"); |
| 3153 | 3089 | ||
| 3154 | staticpro (&Qinteger); | ||
| 3155 | staticpro (&Qsymbol); | ||
| 3156 | staticpro (&Qstring); | ||
| 3157 | staticpro (&Qcons); | ||
| 3158 | staticpro (&Qmarker); | ||
| 3159 | staticpro (&Qoverlay); | ||
| 3160 | staticpro (&Qfloat); | ||
| 3161 | staticpro (&Qwindow_configuration); | ||
| 3162 | staticpro (&Qprocess); | ||
| 3163 | staticpro (&Qwindow); | ||
| 3164 | /* staticpro (&Qsubr); */ | ||
| 3165 | staticpro (&Qcompiled_function); | ||
| 3166 | staticpro (&Qbuffer); | ||
| 3167 | staticpro (&Qframe); | ||
| 3168 | staticpro (&Qvector); | ||
| 3169 | staticpro (&Qchar_table); | ||
| 3170 | staticpro (&Qbool_vector); | ||
| 3171 | staticpro (&Qhash_table); | ||
| 3172 | |||
| 3173 | defsubr (&Sindirect_variable); | 3090 | defsubr (&Sindirect_variable); |
| 3174 | defsubr (&Sinteractive_form); | 3091 | defsubr (&Sinteractive_form); |
| 3175 | defsubr (&Seq); | 3092 | defsubr (&Seq); |