aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYAMAMOTO Mitsuharu2009-12-01 09:07:36 +0000
committerYAMAMOTO Mitsuharu2009-12-01 09:07:36 +0000
commit8096a0ff8c8ef167d993ae1582280a22493adbc5 (patch)
tree2246bb11992d79ad319035955dbe30670cdd4973
parentc31a2fdc34a6ec2f90bd9a408ffd1a710b396369 (diff)
downloademacs-8096a0ff8c8ef167d993ae1582280a22493adbc5.tar.gz
emacs-8096a0ff8c8ef167d993ae1582280a22493adbc5.zip
(font_load_for_lface, font_open_by_name): Don't store name
if entity is Qnil.
-rw-r--r--src/ChangeLog5
-rw-r--r--src/font.c10
2 files changed, 12 insertions, 3 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 4d539a30861..bfd3e833d16 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
12009-12-01 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
2
3 * font.c (font_load_for_lface, font_open_by_name): Don't store name
4 if entity is Qnil.
5
12009-11-30 Stefan Monnier <monnier@iro.umontreal.ca> 62009-11-30 Stefan Monnier <monnier@iro.umontreal.ca>
2 7
3 * print.c (print_preprocess): Preprocess the key_and_value table of 8 * print.c (print_preprocess): Preprocess the key_and_value table of
diff --git a/src/font.c b/src/font.c
index 061b6086ac2..a72e2215956 100644
--- a/src/font.c
+++ b/src/font.c
@@ -3537,8 +3537,11 @@ font_load_for_lface (f, attrs, spec)
3537 it to re-apply the font when font parameters (like hinting or dpi) have 3537 it to re-apply the font when font parameters (like hinting or dpi) have
3538 changed. */ 3538 changed. */
3539 entity = font_open_for_lface (f, entity, attrs, spec); 3539 entity = font_open_for_lface (f, entity, attrs, spec);
3540 name = Ffont_get (spec, QCname); 3540 if (!NILP (entity))
3541 if (STRINGP (name)) font_put_extra (entity, QCname, name); 3541 {
3542 name = Ffont_get (spec, QCname);
3543 if (STRINGP (name)) font_put_extra (entity, QCname, name);
3544 }
3542 return entity; 3545 return entity;
3543} 3546}
3544 3547
@@ -3610,7 +3613,8 @@ font_open_by_name (f, name)
3610 spec = Ffont_spec (2, args); 3613 spec = Ffont_spec (2, args);
3611 ret = font_open_by_spec (f, spec); 3614 ret = font_open_by_spec (f, spec);
3612 /* Do not loose name originally put in. */ 3615 /* Do not loose name originally put in. */
3613 font_put_extra (ret, QCname, args[1]); 3616 if (!NILP (ret))
3617 font_put_extra (ret, QCname, args[1]);
3614 3618
3615 return ret; 3619 return ret;
3616} 3620}