(fontset_from_font): Copy font_spec before changing
authorKenichi Handa <handa@m17n.org>
Fri, 20 Jun 2008 06:12:33 +0000 (06:12 +0000)
committerKenichi Handa <handa@m17n.org>
Fri, 20 Jun 2008 06:12:33 +0000 (06:12 +0000)
the elements.

src/ChangeLog
src/fontset.c

index 4408c59..f005d1b 100644 (file)
@@ -1,5 +1,8 @@
 2008-06-20  Kenichi Handa  <handa@m17n.org>
 
+       * fontset.c (fontset_from_font): Copy font_spec before changing
+       the elements.
+
        * xfns.c (x_default_font_parameter): Try "monospace-12" too.
 
 2008-06-20  Stefan Monnier  <monnier@iro.umontreal.ca>
index e81f6e1..29a0bd4 100644 (file)
@@ -1633,6 +1633,7 @@ fontset_from_font (font_object)
   Vfontset_alias_alist = Fcons (Fcons (name, alias), Vfontset_alias_alist);
   auto_fontset_alist = Fcons (Fcons (font_spec, fontset), auto_fontset_alist);
   FONTSET_ASCII (fontset) = font_name;
+  font_spec = Fcopy_font_spec (font_spec);
   ASET (font_spec, FONT_FOUNDRY_INDEX, Qnil);
   ASET (font_spec, FONT_ADSTYLE_INDEX, Qnil);
   for (i = FONT_WEIGHT_INDEX; i < FONT_EXTRA_INDEX; i++)