From 9b9cd864a84146e0de8c4ddb2f19e2aca5f4ffbf Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Fri, 20 Jun 2008 06:12:33 +0000 Subject: [PATCH] (fontset_from_font): Copy font_spec before changing the elements. --- src/ChangeLog | 3 +++ src/fontset.c | 1 + 2 files changed, 4 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index 4408c59cf37..f005d1bf702 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,8 @@ 2008-06-20 Kenichi Handa + * 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 diff --git a/src/fontset.c b/src/fontset.c index e81f6e16c76..29a0bd4f1d1 100644 --- a/src/fontset.c +++ b/src/fontset.c @@ -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++) -- 2.39.2