]> git.eshelyaron.com Git - emacs.git/commitdiff
(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 4408c59cf37af17817c761960943a8248e172c1a..f005d1bf702545a1af8516c08fc5a5fc67a93959 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 e81f6e16c76cd0e904eb4d2b238078e86cd2ce07..29a0bd4f1d11dddfc7d508edf0a99596be136e84 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++)