+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
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;
}
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;
}