diff src/keyboard.c @ 105877:21bdda3ded62

* xterm.c (syms_of_xterm): * xselect.c (syms_of_xselect): * xmenu.c (syms_of_xmenu): * xfns.c (syms_of_xfns): * xfaces.c (syms_of_xfaces): * xdisp.c (syms_of_xdisp): * window.c (syms_of_window): * w32fns.c (syms_of_w32fns): * undo.c (syms_of_undo): * textprop.c (syms_of_textprop): * terminal.c (syms_of_terminal): * syntax.c (syms_of_syntax): * sound.c (syms_of_sound): * search.c (syms_of_search): * print.c (syms_of_print): * minibuf.c (syms_of_minibuf): * macros.c (syms_of_macros): * keymap.c (syms_of_keymap, initial_define_key) (initial_define_lispy_key): * keyboard.c (syms_of_keyboard): * insdel.c (syms_of_insdel): * image.c (syms_of_image): * fringe.c (syms_of_fringe): * frame.c (syms_of_frame): * fontset.c (syms_of_fontset): * fns.c (syms_of_fns): * fns.c (syms_of_fns): * fileio.c (syms_of_fileio): * fileio.c (syms_of_fileio): * eval.c (syms_of_eval): * doc.c (syms_of_doc): * dispnew.c (syms_of_display): * dired.c (syms_of_dired): * dbusbind.c (syms_of_dbusbind): * data.c (syms_of_data): * composite.c (syms_of_composite): * coding.c (syms_of_coding): * cmds.c (syms_of_cmds): * charset.c (define_charset_internal, syms_of_character): * ccl.c (syms_of_ccl): * category.c (syms_of_category, init_category_once): * casetab.c (syms_of_casetab): * casefiddle.c (syms_of_casefiddle): * callint.c (syms_of_callint): * bytecode.c (syms_of_bytecode): * buffer.c (keys_of_buffer, syms_of_buffer): * alloc.c (syms_of_alloc): * process.c (syms_of_process, init_process): * lread.c (syms_of_lread, init_obarray): * font.c (build_style_table): * emacs.c (syms_of_emacs, main): Replace calls to intern with intern_c_string, calls to make_pure_string with make_pure_c_string. Use pure_cons instead of Fcons. * process.c (socket_options): Make it const. (set_socket_option, init_process): Use a const pointer. * lread.c (intern_c_string): New function. (defvar_kboard, defvar_lisp, defvar_lisp_nopro, defvar_bool) (defvar_int): Uset it. Make the name const char*. * font.c (struct table_entry): Remove unused member. Make NAMES constant. (weight_table, slant_table, width_table): Make constant. * emacs.c (struct standard_args): Make name and longname constant.
author Dan Nicolaescu <dann@ics.uci.edu>
date Fri, 06 Nov 2009 06:50:52 +0000
parents b61f0f08b8e1
children 414b8a7a3334
line wrap: on
line diff
--- a/src/keyboard.c	Fri Nov 06 06:39:33 2009 +0000
+++ b/src/keyboard.c	Fri Nov 06 06:50:52 2009 +0000
@@ -11708,14 +11708,14 @@
   staticpro (&Vlispy_mouse_stem);
 
   /* Tool-bars.  */
-  QCimage = intern (":image");
+  QCimage = intern_c_string (":image");
   staticpro (&QCimage);
 
   staticpro (&Qhelp_echo);
-  Qhelp_echo = intern ("help-echo");
+  Qhelp_echo = intern_c_string ("help-echo");
 
   staticpro (&Qrtl);
-  Qrtl = intern (":rtl");
+  Qrtl = intern_c_string (":rtl");
 
   staticpro (&item_properties);
   item_properties = Qnil;
@@ -11728,135 +11728,135 @@
   staticpro (&real_this_command);
   real_this_command = Qnil;
 
-  Qtimer_event_handler = intern ("timer-event-handler");
+  Qtimer_event_handler = intern_c_string ("timer-event-handler");
   staticpro (&Qtimer_event_handler);
 
-  Qdisabled_command_function = intern ("disabled-command-function");
+  Qdisabled_command_function = intern_c_string ("disabled-command-function");
   staticpro (&Qdisabled_command_function);
 
-  Qself_insert_command = intern ("self-insert-command");
+  Qself_insert_command = intern_c_string ("self-insert-command");
   staticpro (&Qself_insert_command);
 
-  Qforward_char = intern ("forward-char");
+  Qforward_char = intern_c_string ("forward-char");
   staticpro (&Qforward_char);
 
-  Qbackward_char = intern ("backward-char");
+  Qbackward_char = intern_c_string ("backward-char");
   staticpro (&Qbackward_char);
 
-  Qdisabled = intern ("disabled");
+  Qdisabled = intern_c_string ("disabled");
   staticpro (&Qdisabled);
 
-  Qundefined = intern ("undefined");
+  Qundefined = intern_c_string ("undefined");
   staticpro (&Qundefined);
 
-  Qpre_command_hook = intern ("pre-command-hook");
+  Qpre_command_hook = intern_c_string ("pre-command-hook");
   staticpro (&Qpre_command_hook);
 
-  Qpost_command_hook = intern ("post-command-hook");
+  Qpost_command_hook = intern_c_string ("post-command-hook");
   staticpro (&Qpost_command_hook);
 
-  Qdeferred_action_function = intern ("deferred-action-function");
+  Qdeferred_action_function = intern_c_string ("deferred-action-function");
   staticpro (&Qdeferred_action_function);
 
-  Qcommand_hook_internal = intern ("command-hook-internal");
+  Qcommand_hook_internal = intern_c_string ("command-hook-internal");
   staticpro (&Qcommand_hook_internal);
 
-  Qfunction_key = intern ("function-key");
+  Qfunction_key = intern_c_string ("function-key");
   staticpro (&Qfunction_key);
-  Qmouse_click = intern ("mouse-click");
+  Qmouse_click = intern_c_string ("mouse-click");
   staticpro (&Qmouse_click);
 #if defined (WINDOWSNT)
-  Qlanguage_change = intern ("language-change");
+  Qlanguage_change = intern_c_string ("language-change");
   staticpro (&Qlanguage_change);
 #endif
-  Qdrag_n_drop = intern ("drag-n-drop");
+  Qdrag_n_drop = intern_c_string ("drag-n-drop");
   staticpro (&Qdrag_n_drop);
 
-  Qsave_session = intern ("save-session");
+  Qsave_session = intern_c_string ("save-session");
   staticpro (&Qsave_session);
 
 #ifdef HAVE_DBUS
-  Qdbus_event = intern ("dbus-event");
+  Qdbus_event = intern_c_string ("dbus-event");
   staticpro (&Qdbus_event);
 #endif
 
-  Qmenu_enable = intern ("menu-enable");
+  Qmenu_enable = intern_c_string ("menu-enable");
   staticpro (&Qmenu_enable);
-  QCenable = intern (":enable");
+  QCenable = intern_c_string (":enable");
   staticpro (&QCenable);
-  QCvisible = intern (":visible");
+  QCvisible = intern_c_string (":visible");
   staticpro (&QCvisible);
-  QChelp = intern (":help");
+  QChelp = intern_c_string (":help");
   staticpro (&QChelp);
-  QCfilter = intern (":filter");
+  QCfilter = intern_c_string (":filter");
   staticpro (&QCfilter);
-  QCbutton = intern (":button");
+  QCbutton = intern_c_string (":button");
   staticpro (&QCbutton);
-  QCkeys = intern (":keys");
+  QCkeys = intern_c_string (":keys");
   staticpro (&QCkeys);
-  QCkey_sequence = intern (":key-sequence");
+  QCkey_sequence = intern_c_string (":key-sequence");
   staticpro (&QCkey_sequence);
-  QCtoggle = intern (":toggle");
+  QCtoggle = intern_c_string (":toggle");
   staticpro (&QCtoggle);
-  QCradio = intern (":radio");
+  QCradio = intern_c_string (":radio");
   staticpro (&QCradio);
 
-  Qmode_line = intern ("mode-line");
+  Qmode_line = intern_c_string ("mode-line");
   staticpro (&Qmode_line);
-  Qvertical_line = intern ("vertical-line");
+  Qvertical_line = intern_c_string ("vertical-line");
   staticpro (&Qvertical_line);
-  Qvertical_scroll_bar = intern ("vertical-scroll-bar");
+  Qvertical_scroll_bar = intern_c_string ("vertical-scroll-bar");
   staticpro (&Qvertical_scroll_bar);
-  Qmenu_bar = intern ("menu-bar");
+  Qmenu_bar = intern_c_string ("menu-bar");
   staticpro (&Qmenu_bar);
 
 #if defined (HAVE_MOUSE) || defined (HAVE_GPM)
-  Qmouse_fixup_help_message = intern ("mouse-fixup-help-message");
+  Qmouse_fixup_help_message = intern_c_string ("mouse-fixup-help-message");
   staticpro (&Qmouse_fixup_help_message);
 #endif
 
-  Qabove_handle = intern ("above-handle");
+  Qabove_handle = intern_c_string ("above-handle");
   staticpro (&Qabove_handle);
-  Qhandle = intern ("handle");
+  Qhandle = intern_c_string ("handle");
   staticpro (&Qhandle);
-  Qbelow_handle = intern ("below-handle");
+  Qbelow_handle = intern_c_string ("below-handle");
   staticpro (&Qbelow_handle);
-  Qup = intern ("up");
+  Qup = intern_c_string ("up");
   staticpro (&Qup);
-  Qdown = intern ("down");
+  Qdown = intern_c_string ("down");
   staticpro (&Qdown);
-  Qtop = intern ("top");
+  Qtop = intern_c_string ("top");
   staticpro (&Qtop);
-  Qbottom = intern ("bottom");
+  Qbottom = intern_c_string ("bottom");
   staticpro (&Qbottom);
-  Qend_scroll = intern ("end-scroll");
+  Qend_scroll = intern_c_string ("end-scroll");
   staticpro (&Qend_scroll);
-  Qratio = intern ("ratio");
+  Qratio = intern_c_string ("ratio");
   staticpro (&Qratio);
 
-  Qevent_kind = intern ("event-kind");
+  Qevent_kind = intern_c_string ("event-kind");
   staticpro (&Qevent_kind);
-  Qevent_symbol_elements = intern ("event-symbol-elements");
+  Qevent_symbol_elements = intern_c_string ("event-symbol-elements");
   staticpro (&Qevent_symbol_elements);
-  Qevent_symbol_element_mask = intern ("event-symbol-element-mask");
+  Qevent_symbol_element_mask = intern_c_string ("event-symbol-element-mask");
   staticpro (&Qevent_symbol_element_mask);
-  Qmodifier_cache = intern ("modifier-cache");
+  Qmodifier_cache = intern_c_string ("modifier-cache");
   staticpro (&Qmodifier_cache);
 
-  Qrecompute_lucid_menubar = intern ("recompute-lucid-menubar");
+  Qrecompute_lucid_menubar = intern_c_string ("recompute-lucid-menubar");
   staticpro (&Qrecompute_lucid_menubar);
-  Qactivate_menubar_hook = intern ("activate-menubar-hook");
+  Qactivate_menubar_hook = intern_c_string ("activate-menubar-hook");
   staticpro (&Qactivate_menubar_hook);
 
-  Qpolling_period = intern ("polling-period");
+  Qpolling_period = intern_c_string ("polling-period");
   staticpro (&Qpolling_period);
 
-  Qinput_method_function = intern ("input-method-function");
+  Qinput_method_function = intern_c_string ("input-method-function");
   staticpro (&Qinput_method_function);
 
-  Qinput_method_exit_on_first_char = intern ("input-method-exit-on-first-char");
+  Qinput_method_exit_on_first_char = intern_c_string ("input-method-exit-on-first-char");
   staticpro (&Qinput_method_exit_on_first_char);
-  Qinput_method_use_echo_area = intern ("input-method-use-echo-area");
+  Qinput_method_use_echo_area = intern_c_string ("input-method-use-echo-area");
   staticpro (&Qinput_method_use_echo_area);
 
   Fset (Qinput_method_exit_on_first_char, Qnil);
@@ -11872,7 +11872,7 @@
 	 p < head_table + (sizeof (head_table) / sizeof (head_table[0]));
 	 p++)
       {
-	*p->var = intern (p->name);
+	*p->var = intern_c_string (p->name);
 	staticpro (p->var);
 	Fput (*p->var, Qevent_kind, *p->kind);
 	Fput (*p->var, Qevent_symbol_elements, Fcons (*p->var, Qnil));
@@ -11895,7 +11895,7 @@
     modifier_symbols = Fmake_vector (make_number (len), Qnil);
     for (i = 0; i < len; i++)
       if (modifier_names[i])
-	XVECTOR (modifier_symbols)->contents[i] = intern (modifier_names[i]);
+	XVECTOR (modifier_symbols)->contents[i] = intern_c_string (modifier_names[i]);
     staticpro (&modifier_symbols);
   }
 
@@ -11908,7 +11908,7 @@
   raw_keybuf = Fmake_vector (make_number (30), Qnil);
   staticpro (&raw_keybuf);
 
-  Qextended_command_history = intern ("extended-command-history");
+  Qextended_command_history = intern_c_string ("extended-command-history");
   Fset (Qextended_command_history, Qnil);
   staticpro (&Qextended_command_history);
 
@@ -12211,7 +12211,7 @@
 and tests the value when the command returns.
 Buffer modification stores t in this variable.  */);
   Vdeactivate_mark = Qnil;
-  Qdeactivate_mark = intern ("deactivate-mark");
+  Qdeactivate_mark = intern_c_string ("deactivate-mark");
   staticpro (&Qdeactivate_mark);
 
   DEFVAR_LISP ("command-hook-internal", &Vcommand_hook_internal,
@@ -12236,7 +12236,7 @@
   DEFVAR_LISP ("echo-area-clear-hook", ...,
 	       doc: /* Normal hook run when clearing the echo area.  */);
 #endif
-  Qecho_area_clear_hook = intern ("echo-area-clear-hook");
+  Qecho_area_clear_hook = intern_c_string ("echo-area-clear-hook");
   staticpro (&Qecho_area_clear_hook);
   Fset (Qecho_area_clear_hook, Qnil);
 
@@ -12277,7 +12277,7 @@
 
   DEFVAR_LISP ("special-event-map", &Vspecial_event_map,
 	       doc: /* Keymap defining bindings for special events to execute at low level.  */);
-  Vspecial_event_map = Fcons (intern ("keymap"), Qnil);
+  Vspecial_event_map = Fcons (intern_c_string ("keymap"), Qnil);
 
   DEFVAR_LISP ("track-mouse", &do_mouse_tracking,
 	       doc: /* *Non-nil means generate motion events for mouse motion.  */);