aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKenichi Handa2003-01-10 07:22:03 +0000
committerKenichi Handa2003-01-10 07:22:03 +0000
commit77dabd3b55fe1e46565270b58f0690b161c302cc (patch)
tree6e7e77efe92f92d09a30ee32f15836a190621d3a /src
parent7fb92cb1cbc97179fee6bbc527ddf9af7b9c901c (diff)
downloademacs-77dabd3b55fe1e46565270b58f0690b161c302cc.tar.gz
emacs-77dabd3b55fe1e46565270b58f0690b161c302cc.zip
(x_new_fontset): Change the arg FONTSETNAME to Lisp
string. Use new_fontset_from_font_name to create a fontset from a font name.
Diffstat (limited to 'src')
-rw-r--r--src/xterm.c19
1 files changed, 5 insertions, 14 deletions
diff --git a/src/xterm.c b/src/xterm.c
index 893a09db885..fdfc21338ac 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -12321,9 +12321,9 @@ x_new_font (f, fontname)
12321Lisp_Object 12321Lisp_Object
12322x_new_fontset (f, fontsetname) 12322x_new_fontset (f, fontsetname)
12323 struct frame *f; 12323 struct frame *f;
12324 char *fontsetname; 12324 Lisp_Object fontsetname;
12325{ 12325{
12326 int fontset = fs_query_fontset (build_string (fontsetname), 0); 12326 int fontset = fs_query_fontset (fontsetname, 0);
12327 Lisp_Object result; 12327 Lisp_Object result;
12328 12328
12329 if (fontset > 0 && f->output_data.x->fontset == fontset) 12329 if (fontset > 0 && f->output_data.x->fontset == fontset)
@@ -12337,24 +12337,15 @@ x_new_fontset (f, fontsetname)
12337 if (fontset >= 0) 12337 if (fontset >= 0)
12338 result = x_new_font (f, (XSTRING (fontset_ascii (fontset))->data)); 12338 result = x_new_font (f, (XSTRING (fontset_ascii (fontset))->data));
12339 else 12339 else
12340 result = x_new_font (f, fontsetname); 12340 result = x_new_font (f, XSTRING (fontsetname)->data);
12341 12341
12342 if (!STRINGP (result)) 12342 if (!STRINGP (result))
12343 /* Can't load ASCII font. */ 12343 /* Can't load ASCII font. */
12344 return Qnil; 12344 return Qnil;
12345 12345
12346 fontset = fs_query_fontset (result, 0);
12346 if (fontset < 0) 12347 if (fontset < 0)
12347 { 12348 fontset = new_fontset_from_font_name (result);
12348 Lisp_Object func;
12349
12350 func = intern ("create-fontset-from-ascii-font");
12351 if (! NILP (Ffboundp (func)))
12352 result = call2 (func, result, result);
12353 else
12354 Fnew_fontset (result,
12355 Fcons (Fcons (Qascii, Fcons (result, Qnil)), Qnil));
12356 fontset = fs_query_fontset (result, 0);
12357 }
12358 12349
12359 /* Since x_new_font doesn't update any fontset information, do it now. */ 12350 /* Since x_new_font doesn't update any fontset information, do it now. */
12360 f->output_data.x->fontset = fontset; 12351 f->output_data.x->fontset = fontset;