[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 1b77f1981d: Remove intern calls with a static string from haiku*.
From: |
Po Lu |
Subject: |
master 1b77f1981d: Remove intern calls with a static string from haiku*.c |
Date: |
Mon, 19 Sep 2022 23:00:53 -0400 (EDT) |
branch: master
commit 1b77f1981d8aa107becf571939f01ae04ed16873
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>
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.
---
src/haikufns.c | 6 ++++--
src/haikufont.c | 3 ++-
src/haikuterm.c | 4 +++-
3 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/src/haikufns.c b/src/haikufns.c
index aaa4e86622..711202c5df 100644
--- a/src/haikufns.c
+++ b/src/haikufns.c
@@ -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");
diff --git a/src/haikufont.c b/src/haikufont.c
index 3e7f6f86dc..4af9ff9d77 100644
--- a/src/haikufont.c
+++ b/src/haikufont.c
@@ -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");
diff --git a/src/haikuterm.c b/src/haikuterm.c
index df1c39974f..b0832059ba 100644
--- a/src/haikuterm.c
+++ b/src/haikuterm.c
@@ -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
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 1b77f1981d: Remove intern calls with a static string from haiku*.c,
Po Lu <=