Remove intern calls with a static string from haiku*.c

* src/haikufns.c (Fx_show_tip, syms_of_haikufns):
* src/haikufont.c (haikufont_maybe_handle_special_family)
(syms_of_haikufont):
* src/haikuterm.c (haiku_term_init, syms_of_haikuterm): Replace
intern with real predefined symbols.
This commit is contained in:
Po Lu 2022-09-20 03:00:10 +00:00
parent 132d5cb0a3
commit 1b77f1981d
3 changed files with 9 additions and 4 deletions

View file

@ -2636,8 +2636,7 @@ DEFUN ("x-show-tip", Fx_show_tip, Sx_show_tip, 1, 6, 0,
start_timer:
/* Let the tip disappear after timeout seconds. */
tip_timer = call3 (intern ("run-at-time"), timeout, Qnil,
intern ("x-hide-tip"));
tip_timer = call3 (Qrun_at_time, timeout, Qnil, Qx_hide_tip);
return unbind_to (count, Qnil);
}
@ -3149,6 +3148,9 @@ syms_of_haikufns (void)
DEFSYM (Qcancel_timer, "cancel-timer");
DEFSYM (Qassq_delete_all, "assq-delete-all");
DEFSYM (Qrun_at_time, "run-at-time");
DEFSYM (Qx_hide_tip, "x-hide-tip");
DEFSYM (Qalways, "always");
DEFSYM (Qnot_useful, "not-useful");
DEFSYM (Qwhen_mapped, "when-mapped");

View file

@ -370,7 +370,7 @@ haikufont_maybe_handle_special_family (Lisp_Object family,
BFont_populate_fixed_family (ptn);
return 1;
}
else if (EQ (family, intern ("Sans Serif")))
else if (EQ (family, QSans_Serif))
{
BFont_populate_plain_family (ptn);
return 1;
@ -1320,6 +1320,7 @@ syms_of_haikufont_for_pdumper (void)
void
syms_of_haikufont (void)
{
DEFSYM (QSans_Serif, "Sans Serif");
DEFSYM (Qfontsize, "fontsize");
DEFSYM (Qfixed, "fixed");
DEFSYM (Qplain, "plain");

View file

@ -4349,7 +4349,7 @@ haiku_term_init (void)
emacs_abort ();
color_file = Fexpand_file_name (build_string ("rgb.txt"),
Fsymbol_value (intern ("data-directory")));
Fsymbol_value (Qdata_directory));
color_map = Fx_load_color_file (color_file);
if (NILP (color_map))
@ -4634,6 +4634,8 @@ syms_of_haikuterm (void)
DEFSYM (Qoption, "option");
DEFSYM (Qcommand, "command");
DEFSYM (Qdata_directory, "data-directory");
DEFVAR_LISP ("haiku-meta-keysym", Vhaiku_meta_keysym,
doc: /* Which key Emacs uses as the meta modifier.
This is either one of the symbols `shift', `control', `command', and