aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGerd Moellmann2001-01-04 13:04:11 +0000
committerGerd Moellmann2001-01-04 13:04:11 +0000
commit482cca617e3c9518c1f9d1d24a055151f5b9d0d7 (patch)
tree7a074f4bf7017b17762ed27123579db390ac4146 /src
parent85fe3b5e15a4c40ed52b10959933421f32578be2 (diff)
downloademacs-482cca617e3c9518c1f9d1d24a055151f5b9d0d7.tar.gz
emacs-482cca617e3c9518c1f9d1d24a055151f5b9d0d7.zip
(set_font_frame_param): Don't do anything for
non-graphical frames.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog3
-rw-r--r--src/xfaces.c34
2 files changed, 22 insertions, 15 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 38ddb31ee93..44ae4668455 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,8 @@
12001-01-04 Gerd Moellmann <gerd@gnu.org> 12001-01-04 Gerd Moellmann <gerd@gnu.org>
2 2
3 * xfaces.c (set_font_frame_param): Don't do anything for
4 non-graphical frames.
5
3 * window.c (Fdelete_other_windows): Set window's window_end_valid 6 * window.c (Fdelete_other_windows): Set window's window_end_valid
4 to nil when changing the window's start. Don't change the 7 to nil when changing the window's start. Don't change the
5 window's start when its top position hasn't changed. If we do, 8 window's start when its top position hasn't changed. If we do,
diff --git a/src/xfaces.c b/src/xfaces.c
index c510885254b..65f912ef24d 100644
--- a/src/xfaces.c
+++ b/src/xfaces.c
@@ -4197,24 +4197,28 @@ set_font_frame_param (frame, lface)
4197 Lisp_Object frame, lface; 4197 Lisp_Object frame, lface;
4198{ 4198{
4199 struct frame *f = XFRAME (frame); 4199 struct frame *f = XFRAME (frame);
4200 Lisp_Object font_name;
4201 char *font;
4202 4200
4203 if (STRINGP (LFACE_FONT (lface))) 4201 if (FRAME_WINDOW_P (f))
4204 font_name = LFACE_FONT (lface);
4205 else
4206 { 4202 {
4207 /* Choose a font name that reflects LFACE's attributes and has 4203 Lisp_Object font_name;
4208 the registry and encoding pattern specified in the default 4204 char *font;
4209 fontset (3rd arg: -1) for ASCII characters (4th arg: 0). */ 4205
4210 font = choose_face_font (f, XVECTOR (lface)->contents, -1, 0); 4206 if (STRINGP (LFACE_FONT (lface)))
4211 if (!font) 4207 font_name = LFACE_FONT (lface);
4212 error ("No font matches the specified attribute"); 4208 else
4213 font_name = build_string (font); 4209 {
4214 xfree (font); 4210 /* Choose a font name that reflects LFACE's attributes and has
4215 } 4211 the registry and encoding pattern specified in the default
4212 fontset (3rd arg: -1) for ASCII characters (4th arg: 0). */
4213 font = choose_face_font (f, XVECTOR (lface)->contents, -1, 0);
4214 if (!font)
4215 error ("No font matches the specified attribute");
4216 font_name = build_string (font);
4217 xfree (font);
4218 }
4216 4219
4217 Fmodify_frame_parameters (frame, Fcons (Fcons (Qfont, font_name), Qnil)); 4220 Fmodify_frame_parameters (frame, Fcons (Fcons (Qfont, font_name), Qnil));
4221 }
4218} 4222}
4219 4223
4220 4224