diff options
author | Jan Djärv <jan.h.d@swipnet.se> | 2014-10-01 19:41:18 +0200 |
---|---|---|
committer | Jan Djärv <jan.h.d@swipnet.se> | 2014-10-01 19:41:18 +0200 |
commit | e2e773b9e697e45d352ba02adb8446f26c7a59de (patch) | |
tree | 30d4ca46b0c551d9c55216ca7106b19d115b44b7 | |
parent | 24e1e65553a2594510c32f1fe2f2c9f654a4ef42 (diff) | |
download | emacs-e2e773b9e697e45d352ba02adb8446f26c7a59de.tar.gz |
* xfaces.c (Finternal_set_lisp_face_attribute): Don't try to
make a font_object from a tty frame.
Fixes: debbugs:18573
-rw-r--r-- | src/ChangeLog | 5 | ||||
-rw-r--r-- | src/xfaces.c | 25 |
2 files changed, 19 insertions, 11 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index fdc30da96b6..63fcf130542 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2014-10-01 Jan Djärv <jan.h.d@swipnet.se> + + * xfaces.c (Finternal_set_lisp_face_attribute): Don't try to + make a font_object from a tty frame (Bug#18573). + 2014-09-30 Eli Zaretskii <eliz@gnu.org> * w32fns.c (w32_createwindow): Accept an additional argument, an diff --git a/src/xfaces.c b/src/xfaces.c index ac67c7b7be4..5d158f08099 100644 --- a/src/xfaces.c +++ b/src/xfaces.c @@ -3119,17 +3119,20 @@ FRAME 0 means change the face on all frames, and change the default f = XFRAME (selected_frame); else f = XFRAME (frame); - if (! FONT_OBJECT_P (value)) - { - Lisp_Object *attrs = XVECTOR (lface)->contents; - Lisp_Object font_object; - - font_object = font_load_for_lface (f, attrs, value); - if (NILP (font_object)) - signal_error ("Font not available", value); - value = font_object; - } - set_lface_from_font (f, lface, value, 1); + if (f->terminal->type != output_termcap) + { + if (! FONT_OBJECT_P (value)) + { + Lisp_Object *attrs = XVECTOR (lface)->contents; + Lisp_Object font_object; + + font_object = font_load_for_lface (f, attrs, value); + if (NILP (font_object)) + signal_error ("Font not available", value); + value = font_object; + } + set_lface_from_font (f, lface, value, 1); + } } else ASET (lface, LFACE_FONT_INDEX, value); |