summaryrefslogtreecommitdiff
path: root/src/xfont.c
diff options
context:
space:
mode:
authorPo Lu <luangruo@yahoo.com>2022-09-19 10:01:52 +0800
committerPo Lu <luangruo@yahoo.com>2022-09-19 10:01:52 +0800
commit5b3c4004a9647aa2068e54c358e202f57d0ece3c (patch)
tree0ca3ed81d2c14bc333eeab0dfd7ef45e054baa40 /src/xfont.c
parent202c416e2e829cfdfde83bc82705be4b7ad6799e (diff)
downloademacs-5b3c4004a9647aa2068e54c358e202f57d0ece3c.tar.gz
Remove calls to intern with a static string from code that runs on X
* Makefile.in (actual-all): Reword build failure advice. * src/bytecode.c (exec_byte_code, syms_of_bytecode): * src/font.c (syms_of_font): * src/hbfont.c (uni_combining): * src/xfns.c (Fx_display_backing_store, Fx_display_visual_class) (x_create_tip_frame, Fx_show_tip, syms_of_xfns): * src/xfont.c (xfont_supported_scripts, xfont_driver) (syms_of_xfont): * src/xsmfns.c (Fhandle_save_session, syms_of_xsmfns): Remove calls to intern with a static string.
Diffstat (limited to 'src/xfont.c')
-rw-r--r--src/xfont.c34
1 files changed, 19 insertions, 15 deletions
diff --git a/src/xfont.c b/src/xfont.c
index 74237e8aa88..951446b44d2 100644
--- a/src/xfont.c
+++ b/src/xfont.c
@@ -253,9 +253,9 @@ xfont_supported_scripts (Display *display, char *fontname, Lisp_Object props,
/* Two special cases to avoid opening rather big fonts. */
if (EQ (AREF (props, 2), Qja))
- return list2 (intern ("kana"), intern ("han"));
+ return list2 (Qkana, Qhan);
if (EQ (AREF (props, 2), Qko))
- return list1 (intern ("hangul"));
+ return list1 (Qhangul);
scripts = Fgethash (props, xfont_scripts_cache, Qt);
if (EQ (scripts, Qt))
{
@@ -1130,19 +1130,19 @@ static void syms_of_xfont_for_pdumper (void);
struct font_driver const xfont_driver =
{
- .type = LISPSYM_INITIALLY (Qx),
- .get_cache = xfont_get_cache,
- .list = xfont_list,
- .match = xfont_match,
- .list_family = xfont_list_family,
- .open_font = xfont_open,
- .close_font = xfont_close,
- .prepare_face = xfont_prepare_face,
- .has_char = xfont_has_char,
- .encode_char = xfont_encode_char,
- .text_extents = xfont_text_extents,
- .draw = xfont_draw,
- .check = xfont_check,
+ .type = LISPSYM_INITIALLY (Qx),
+ .get_cache = xfont_get_cache,
+ .list = xfont_list,
+ .match = xfont_match,
+ .list_family = xfont_list_family,
+ .open_font = xfont_open,
+ .close_font = xfont_close,
+ .prepare_face = xfont_prepare_face,
+ .has_char = xfont_has_char,
+ .encode_char = xfont_encode_char,
+ .text_extents = xfont_text_extents,
+ .draw = xfont_draw,
+ .check = xfont_check,
};
void
@@ -1153,6 +1153,10 @@ syms_of_xfont (void)
staticpro (&xfont_scratch_props);
xfont_scratch_props = make_nil_vector (8);
pdumper_do_now_and_after_load (syms_of_xfont_for_pdumper);
+
+ DEFSYM (Qkana, "kana");
+ DEFSYM (Qhan, "han");
+ DEFSYM (Qhangul, "hangul");
}
static void