use vectors for symbol slots
[bpt/emacs.git] / src / font.c
index 251d43b..ddf2856 100644 (file)
@@ -5061,6 +5061,8 @@ font_deferred_log (const char *action, Lisp_Object arg, Lisp_Object result)
 void
 syms_of_font (void)
 {
+#include "font.x"
+
   sort_shift_bits[FONT_TYPE_INDEX] = 0;
   sort_shift_bits[FONT_SLANT_INDEX] = 2;
   sort_shift_bits[FONT_WEIGHT_INDEX] = 9;
@@ -5121,41 +5123,6 @@ syms_of_font (void)
 #endif /* HAVE_LIBOTF */
 #endif /* 0 */
 
-  defsubr (&Sfontp);
-  defsubr (&Sfont_spec);
-  defsubr (&Sfont_get);
-#ifdef HAVE_WINDOW_SYSTEM
-  defsubr (&Sfont_face_attributes);
-#endif
-  defsubr (&Sfont_put);
-  defsubr (&Slist_fonts);
-  defsubr (&Sfont_family_list);
-  defsubr (&Sfind_font);
-  defsubr (&Sfont_xlfd_name);
-  defsubr (&Sclear_font_cache);
-  defsubr (&Sfont_shape_gstring);
-  defsubr (&Sfont_variation_glyphs);
-#if 0
-  defsubr (&Sfont_drive_otf);
-  defsubr (&Sfont_otf_alternates);
-#endif /* 0 */
-
-#ifdef FONT_DEBUG
-  defsubr (&Sopen_font);
-  defsubr (&Sclose_font);
-  defsubr (&Squery_font);
-  defsubr (&Sfont_get_glyphs);
-  defsubr (&Sfont_match_p);
-  defsubr (&Sfont_at);
-#if 0
-  defsubr (&Sdraw_string);
-#endif
-  defsubr (&Sframe_font_cache);
-#endif /* FONT_DEBUG */
-#ifdef HAVE_WINDOW_SYSTEM
-  defsubr (&Sfont_info);
-#endif
-
   DEFVAR_LISP ("font-encoding-alist", Vfont_encoding_alist,
               doc: /*
 Alist of fontname patterns vs the corresponding encoding and repertory info.
@@ -5189,19 +5156,19 @@ Each element has the form:
     [NUMERIC-VALUE SYMBOLIC-NAME ALIAS-NAME ...]
 NUMERIC-VALUE is an integer, and SYMBOLIC-NAME and ALIAS-NAME are symbols. */);
   Vfont_weight_table = BUILD_STYLE_TABLE (weight_table);
-  XSYMBOL (intern_c_string ("font-weight-table"))->constant = 1;
+  SET_SYMBOL_CONSTANT (XSYMBOL (intern_c_string ("font-weight-table")), 1);
 
   DEFVAR_LISP_NOPRO ("font-slant-table", Vfont_slant_table,
               doc: /*  Vector of font slant symbols vs the corresponding numeric values.
 See `font-weight-table' for the format of the vector. */);
   Vfont_slant_table = BUILD_STYLE_TABLE (slant_table);
-  XSYMBOL (intern_c_string ("font-slant-table"))->constant = 1;
+  SET_SYMBOL_CONSTANT (XSYMBOL (intern_c_string ("font-slant-table")), 1);
 
   DEFVAR_LISP_NOPRO ("font-width-table", Vfont_width_table,
               doc: /*  Alist of font width symbols vs the corresponding numeric values.
 See `font-weight-table' for the format of the vector. */);
   Vfont_width_table = BUILD_STYLE_TABLE (width_table);
-  XSYMBOL (intern_c_string ("font-width-table"))->constant = 1;
+  SET_SYMBOL_CONSTANT (XSYMBOL (intern_c_string ("font-width-table")), 1);
 
   staticpro (&font_style_table);
   font_style_table = make_uninit_vector (3);