]> code.delx.au - gnu-emacs/blobdiff - src/fontset.c
Update copyright year to 2015
[gnu-emacs] / src / fontset.c
index 5e18d14bd65c7ef457f34801978be4a5199f2503..974b144c25943450381b628eb9a7d6b677c00a7d 100644 (file)
@@ -1,6 +1,6 @@
 /* Fontset handler.
 
-Copyright (C) 2001-2014 Free Software Foundation, Inc.
+Copyright (C) 2001-2015 Free Software Foundation, Inc.
 Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
   2005, 2006, 2007, 2008, 2009, 2010, 2011
   National Institute of Advanced Industrial Science and Technology (AIST)
@@ -92,26 +92,27 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
    range of characters in this fontset, but may be available in the
    default fontset.
 
+   A fontset has 8 extra slots.
 
-   A fontset has 9 extra slots.
-
-   The 1st slot: the ID number of the fontset
+   The 1st slot:
+       base: the ID number of the fontset
+       realized: Likewise
 
    The 2nd slot:
        base: the name of the fontset
        realized: nil
 
    The 3rd slot:
-       base: nil
-       realized: the base fontset
+       base: the font name for ASCII characters
+       realized: nil
 
    The 4th slot:
        base: nil
-       realized: the frame that the fontset belongs to
+       realized: the base fontset
 
    The 5th slot:
-       base: the font name for ASCII characters
-       realized: nil
+       base: nil
+       realized: the frame that the fontset belongs to
 
    The 6th slot:
        base: nil
@@ -119,16 +120,11 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
                  has no font in a realized fontset.
 
    The 7th slot:
-       base: nil
-       realized: Alist of font index vs the corresponding repertory
-       char-table.
-
-   The 8th slot:
        base: nil
        realized: If the base is not the default fontset, a fontset
-       realized from the default fontset, else nil.
+                 realized from the default fontset, else nil.
 
-   The 9th slot:
+   The 8th slot:
        base: Same as element value (but for fallback fonts).
        realized: Likewise.
 
@@ -393,7 +389,7 @@ reorder_font_vector (Lisp_Object font_group, struct font *font)
   Lisp_Object vec, font_object;
   int size;
   int i;
-  bool score_changed = 0;
+  bool score_changed = false;
 
   if (font)
     XSETFONT (font_object, font);
@@ -448,14 +444,15 @@ reorder_font_vector (Lisp_Object font_group, struct font *font)
       if (RFONT_DEF_SCORE (rfont_def) != score)
        {
          RFONT_DEF_SET_SCORE (rfont_def, score);
-         score_changed = 1;
+         score_changed = true;
        }
     }
 
   if (score_changed)
     qsort (XVECTOR (vec)->contents, size, word_size,
           fontset_compare_rfontdef);
-  XSETCAR (font_group, make_number (charset_ordered_list_tick));
+  EMACS_INT low_tick_bits = charset_ordered_list_tick & MOST_POSITIVE_FIXNUM;
+  XSETCAR (font_group, make_number (low_tick_bits));
 }
 
 /* Return a font-group (actually a cons (-1 . FONT-GROUP-VECTOR)) for
@@ -1462,8 +1459,8 @@ appended.  By default, FONT-SPEC overrides the previous settings.  */)
       registry = AREF (font_spec, FONT_REGISTRY_INDEX);
       if (! NILP (registry))
        registry = Fdowncase (SYMBOL_NAME (registry));
-      encoding = find_font_encoding (concat3 (family, build_local_string ("-"),
-                                             registry));
+      AUTO_STRING (dash, "-");
+      encoding = find_font_encoding (concat3 (family, dash, registry));
       if (NILP (encoding))
        encoding = Qascii;
 
@@ -1575,7 +1572,7 @@ appended.  By default, FONT-SPEC overrides the previous settings.  */)
 
   if (ascii_changed)
     {
-      Lisp_Object tail, fr, alist;
+      Lisp_Object tail, fr;
       int fontset_id = XINT (FONTSET_ID (fontset));
 
       set_fontset_ascii (fontset, fontname);
@@ -1598,8 +1595,8 @@ appended.  By default, FONT-SPEC overrides the previous settings.  */)
          if (! NILP (font_object))
            {
              update_auto_fontset_alist (font_object, fontset);
-             alist = FRAME_PARAMETER (Qfont, Fcons (name, font_object));
-             Fmodify_frame_parameters (fr, alist);
+             AUTO_FRAME_ARG (arg, Qfont, Fcons (name, font_object));
+             Fmodify_frame_parameters (fr, arg);
            }
        }
     }