Commit 8096a0ff authored by YAMAMOTO Mitsuharu's avatar YAMAMOTO Mitsuharu

(font_load_for_lface, font_open_by_name): Don't store name

if entity is Qnil.
parent c31a2fdc
2009-12-01 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
* font.c (font_load_for_lface, font_open_by_name): Don't store name
if entity is Qnil.
2009-11-30 Stefan Monnier <monnier@iro.umontreal.ca>
* print.c (print_preprocess): Preprocess the key_and_value table of
......
......@@ -3537,8 +3537,11 @@ font_load_for_lface (f, attrs, spec)
it to re-apply the font when font parameters (like hinting or dpi) have
changed. */
entity = font_open_for_lface (f, entity, attrs, spec);
name = Ffont_get (spec, QCname);
if (STRINGP (name)) font_put_extra (entity, QCname, name);
if (!NILP (entity))
{
name = Ffont_get (spec, QCname);
if (STRINGP (name)) font_put_extra (entity, QCname, name);
}
return entity;
}
......@@ -3610,7 +3613,8 @@ font_open_by_name (f, name)
spec = Ffont_spec (2, args);
ret = font_open_by_spec (f, spec);
/* Do not loose name originally put in. */
font_put_extra (ret, QCname, args[1]);
if (!NILP (ret))
font_put_extra (ret, QCname, args[1]);
return ret;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment