]> code.delx.au - gnu-emacs/blobdiff - src/fontset.c
Move all DEFVAR'd globals into a structure -- threading infrastructure
[gnu-emacs] / src / fontset.c
index 86b9ceb45db705e7db2c0f9a2e0446bba3b8759a..be8ff1bd0ebedbe554a08347c22bd9afda335233 100644 (file)
@@ -1,8 +1,8 @@
 /* Fontset handler.
-   Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
+   Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
      Free Software Foundation, Inc.
    Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-     2005, 2006, 2007, 2008, 2009, 2010
+     2005, 2006, 2007, 2008, 2009, 2010, 2011
      National Institute of Advanced Industrial Science and Technology (AIST)
      Registration Number H14PRO021
    Copyright (C) 2003, 2006
@@ -64,8 +64,6 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #define xassert(X)     (void) 0
 #endif /* not FONTSET_DEBUG */
 
-EXFUN (Fclear_face_cache, 1);
-
 /* FONTSET
 
    A fontset is a collection of font related information to give
@@ -193,14 +191,6 @@ static int next_fontset_id;
    font for each character.  */
 static Lisp_Object Vdefault_fontset;
 
-Lisp_Object Vfont_encoding_charset_alist;
-Lisp_Object Vuse_default_ascent;
-Lisp_Object Vignore_relative_composition;
-Lisp_Object Valternate_fontname_alist;
-Lisp_Object Vfontset_alias_alist;
-Lisp_Object Vvertical_centering_font_regexp;
-Lisp_Object Votf_script_alist;
-
 /* Check if any window system is used now.  */
 void (*check_window_system_func) (void);
 
@@ -216,8 +206,6 @@ static Lisp_Object make_fontset (Lisp_Object, Lisp_Object, Lisp_Object);
 static Lisp_Object fontset_pattern_regexp (Lisp_Object);
 static void accumulate_script_ranges (Lisp_Object, Lisp_Object,
                                       Lisp_Object);
-Lisp_Object find_font_encoding (Lisp_Object);
-
 static void set_fontset_font (Lisp_Object, Lisp_Object);
 
 #ifdef FONTSET_DEBUG
@@ -225,8 +213,7 @@ static void set_fontset_font (Lisp_Object, Lisp_Object);
 /* Return 1 if ID is a valid fontset id, else return 0.  */
 
 static int
-fontset_id_valid_p (id)
-     int id;
+fontset_id_valid_p (int id)
 {
   return (id >= 0 && id < ASIZE (Vfontset_table) - 1);
 }
@@ -854,12 +841,12 @@ free_realized_fontset (FRAME_PTR f, Lisp_Object fontset)
 {
   Lisp_Object tail;
 
-  return;
-  for (tail = FONTSET_OBJLIST (fontset); CONSP (tail); tail = XCDR (tail))
-    {
-      xassert (FONT_OBJECT_P (XCAR (tail)));
-      font_close_object (f, XCAR (tail));
-    }
+  if (0)
+    for (tail = FONTSET_OBJLIST (fontset); CONSP (tail); tail = XCDR (tail))
+      {
+       xassert (FONT_OBJECT_P (XCAR (tail)));
+       font_close_object (f, XCAR (tail));
+      }
 }
 
 /* Free fontset of FACE defined on frame F.  Called from
@@ -2128,8 +2115,7 @@ DEFUN ("fontset-list", Ffontset_list, Sfontset_list, 0, 0, 0,
 #ifdef FONTSET_DEBUG
 
 Lisp_Object
-dump_fontset (fontset)
-     Lisp_Object fontset;
+dump_fontset (Lisp_Object fontset)
 {
   Lisp_Object vec;
 
@@ -2205,7 +2191,7 @@ syms_of_fontset (void)
   auto_fontset_alist = Qnil;
   staticpro (&auto_fontset_alist);
 
-  DEFVAR_LISP ("font-encoding-charset-alist", &Vfont_encoding_charset_alist,
+  DEFVAR_LISP ("font-encoding-charset-alist", Vfont_encoding_charset_alist,
               doc: /*
 Alist of charsets vs the charsets to determine the preferred font encoding.
 Each element looks like (CHARSET . ENCODING-CHARSET),
@@ -2216,7 +2202,7 @@ When a text has a property `charset' and the value is CHARSET, a font
 whose encoding corresponds to ENCODING-CHARSET is preferred.  */);
   Vfont_encoding_charset_alist = Qnil;
 
-  DEFVAR_LISP ("use-default-ascent", &Vuse_default_ascent,
+  DEFVAR_LISP ("use-default-ascent", Vuse_default_ascent,
               doc: /*
 Char table of characters whose ascent values should be ignored.
 If an entry for a character is non-nil, the ascent value of the glyph
@@ -2226,7 +2212,7 @@ This affects how a composite character which contains
 such a character is displayed on screen.  */);
   Vuse_default_ascent = Qnil;
 
-  DEFVAR_LISP ("ignore-relative-composition", &Vignore_relative_composition,
+  DEFVAR_LISP ("ignore-relative-composition", Vignore_relative_composition,
               doc: /*
 Char table of characters which are not composed relatively.
 If an entry for a character is non-nil, a composition sequence
@@ -2235,26 +2221,26 @@ the glyph of that character is put without considering
 an ascent and descent value of a previous character.  */);
   Vignore_relative_composition = Qnil;
 
-  DEFVAR_LISP ("alternate-fontname-alist", &Valternate_fontname_alist,
+  DEFVAR_LISP ("alternate-fontname-alist", Valternate_fontname_alist,
               doc: /* Alist of fontname vs list of the alternate fontnames.
 When a specified font name is not found, the corresponding
 alternate fontnames (if any) are tried instead.  */);
   Valternate_fontname_alist = Qnil;
 
-  DEFVAR_LISP ("fontset-alias-alist", &Vfontset_alias_alist,
+  DEFVAR_LISP ("fontset-alias-alist", Vfontset_alias_alist,
               doc: /* Alist of fontset names vs the aliases.  */);
   Vfontset_alias_alist = Fcons (Fcons (FONTSET_NAME (Vdefault_fontset),
                                       make_pure_c_string ("fontset-default")),
                                Qnil);
 
   DEFVAR_LISP ("vertical-centering-font-regexp",
-              &Vvertical_centering_font_regexp,
+              Vvertical_centering_font_regexp,
               doc: /* *Regexp matching font names that require vertical centering on display.
 When a character is displayed with such fonts, the character is displayed
 at the vertical center of lines.  */);
   Vvertical_centering_font_regexp = Qnil;
 
-  DEFVAR_LISP ("otf-script-alist", &Votf_script_alist,
+  DEFVAR_LISP ("otf-script-alist", Votf_script_alist,
               doc: /* Alist of OpenType script tags vs the corresponding script names.  */);
   Votf_script_alist = Qnil;
 
@@ -2269,6 +2255,3 @@ at the vertical center of lines.  */);
   defsubr (&Sfontset_list_all);
 #endif
 }
-
-/* arch-tag: ea861585-2f5f-4e5b-9849-d04a9c3a3537
-   (do not change this comment) */