diff --git a/src/alloc.c b/src/alloc.c index 369592d70ee..ff32d1639ee 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -5696,7 +5696,7 @@ purecopy (Lisp_Object obj) VARADDRESS. */ void -staticpro (Lisp_Object *varaddress) +staticpro_1 (Lisp_Object *varaddress) { if (staticidx >= NSTATICS) fatal ("NSTATICS too small; try increasing and recompiling Emacs."); diff --git a/src/bidi.c b/src/bidi.c index 9bc8dbe8603..24e435bbc1d 100644 --- a/src/bidi.c +++ b/src/bidi.c @@ -1090,25 +1090,20 @@ bidi_unshelve_cache (void *databuf, bool just_free) static void bidi_initialize (void) { - bidi_type_table = uniprop_table (intern ("bidi-class")); + staticpro (&bidi_type_table, uniprop_table (intern ("bidi-class"))); if (NILP (bidi_type_table)) emacs_abort (); - staticpro (&bidi_type_table); - bidi_mirror_table = uniprop_table (intern ("mirroring")); + staticpro (&bidi_mirror_table, uniprop_table (intern ("mirroring"))); if (NILP (bidi_mirror_table)) emacs_abort (); - staticpro (&bidi_mirror_table); - bidi_brackets_table = uniprop_table (intern ("bracket-type")); + staticpro (&bidi_brackets_table, uniprop_table (intern ("bracket-type"))); if (NILP (bidi_brackets_table)) emacs_abort (); - staticpro (&bidi_brackets_table); - paragraph_start_re = build_string ("^\\(\f\\|[ \t]*\\)$"); - staticpro (¶graph_start_re); - paragraph_separate_re = build_string ("^[ \t\f]*$"); - staticpro (¶graph_separate_re); + staticpro (¶graph_start_re, build_string ("^\\(\f\\|[ \t]*\\)$")); + staticpro (¶graph_separate_re, build_string ("^[ \t\f]*$")); bidi_cache_sp = 0; bidi_cache_total_alloc = 0; diff --git a/src/buffer.c b/src/buffer.c index 14837372d34..e90bf6ece20 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -5441,12 +5441,11 @@ defvar_per_buffer (struct Lisp_Buffer_Objfwd *bo_fwd, const char *namestring, void syms_of_buffer (void) { - staticpro (&last_overlay_modification_hooks); - last_overlay_modification_hooks - = Fmake_vector (make_number (10), Qnil); + staticpro (&last_overlay_modification_hooks, + Fmake_vector (make_number (10), Qnil)); - staticpro (&QSFundamental); - staticpro (&Vbuffer_alist); + staticpro (&QSFundamental, Qnil); + staticpro (&Vbuffer_alist, Qnil); DEFSYM (Qchoice, "choice"); DEFSYM (Qleft, "left"); diff --git a/src/callint.c b/src/callint.c index 08a8bba4646..8cac305e0b4 100644 --- a/src/callint.c +++ b/src/callint.c @@ -826,11 +826,9 @@ Its numeric meaning is what you would get from `(interactive "p")'. */) void syms_of_callint (void) { - point_marker = Fmake_marker (); - staticpro (&point_marker); + staticpro (&point_marker, Fmake_marker ()); - callint_message = Qnil; - staticpro (&callint_message); + staticpro (&callint_message, Qnil); preserved_fns = listn (CONSTYPE_PURE, 4, intern_c_string ("region-beginning"), diff --git a/src/callproc.c b/src/callproc.c index 973f324139c..5b3867288e1 100644 --- a/src/callproc.c +++ b/src/callproc.c @@ -1640,15 +1640,13 @@ void syms_of_callproc (void) { #ifndef DOS_NT - Vtemp_file_name_pattern = build_string ("emacsXXXXXX"); + staticpro (&Vtemp_file_name_pattern, build_string ("emacsXXXXXX")); #else /* DOS_NT */ - Vtemp_file_name_pattern = build_string ("emXXXXXX"); + staticpro (&Vtemp_file_name_pattern, build_string ("emXXXXXX")); #endif - staticpro (&Vtemp_file_name_pattern); #ifdef MSDOS - synch_process_tempfile = make_number (0); - staticpro (&synch_process_tempfile); + staticpro (&synch_process_tempfile, make_number (0)); #endif DEFVAR_LISP ("shell-file-name", Vshell_file_name, diff --git a/src/casetab.c b/src/casetab.c index 8f806a0647c..d2388d5fc58 100644 --- a/src/casetab.c +++ b/src/casetab.c @@ -247,6 +247,11 @@ init_casetab_once (void) DEFSYM (Qcase_table, "case-table"); Fput (Qcase_table, Qchar_table_extra_slots, make_number (3)); + staticpro (&Vascii_canon_table, Qnil); + staticpro (&Vascii_downcase_table, Qnil); + staticpro (&Vascii_eqv_table, Qnil); + staticpro (&Vascii_upcase_table, Qnil); + down = Fmake_char_table (Qcase_table, Qnil); Vascii_downcase_table = down; set_char_table_purpose (down, Qcase_table); @@ -289,11 +294,6 @@ syms_of_casetab (void) { DEFSYM (Qcase_table_p, "case-table-p"); - staticpro (&Vascii_canon_table); - staticpro (&Vascii_downcase_table); - staticpro (&Vascii_eqv_table); - staticpro (&Vascii_upcase_table); - defsubr (&Scase_table_p); defsubr (&Scurrent_case_table); defsubr (&Sstandard_case_table); diff --git a/src/ccl.c b/src/ccl.c index ed8588d7f8a..b2a45c87419 100644 --- a/src/ccl.c +++ b/src/ccl.c @@ -2274,8 +2274,7 @@ Return index number of the registered map. */) void syms_of_ccl (void) { - staticpro (&Vccl_program_table); - Vccl_program_table = Fmake_vector (make_number (32), Qnil); + staticpro (&Vccl_program_table, Fmake_vector (make_number (32), Qnil)); DEFSYM (Qccl, "ccl"); DEFSYM (Qcclp, "cclp"); diff --git a/src/character.c b/src/character.c index 6a689808043..cbde3f414e9 100644 --- a/src/character.c +++ b/src/character.c @@ -1099,8 +1099,7 @@ syms_of_character (void) DEFSYM (Qcharacterp, "characterp"); DEFSYM (Qauto_fill_chars, "auto-fill-chars"); - staticpro (&Vchar_unify_table); - Vchar_unify_table = Qnil; + staticpro (&Vchar_unify_table, Qnil); defsubr (&Smax_char); defsubr (&Scharacterp); diff --git a/src/charset.c b/src/charset.c index 05290e86b4e..60b46137d19 100644 --- a/src/charset.c +++ b/src/charset.c @@ -2348,17 +2348,13 @@ syms_of_charset (void) DEFSYM (Qeight_bit, "eight-bit"); DEFSYM (Qiso_8859_1, "iso-8859-1"); - staticpro (&Vcharset_ordered_list); - Vcharset_ordered_list = Qnil; + staticpro (&Vcharset_ordered_list, Qnil); - staticpro (&Viso_2022_charset_list); - Viso_2022_charset_list = Qnil; + staticpro (&Viso_2022_charset_list, Qnil); - staticpro (&Vemacs_mule_charset_list); - Vemacs_mule_charset_list = Qnil; + staticpro (&Vemacs_mule_charset_list, Qnil); - staticpro (&Vcharset_hash_table); - Vcharset_hash_table = CALLN (Fmake_hash_table, QCtest, Qeq); + staticpro (&Vcharset_hash_table, CALLN (Fmake_hash_table, QCtest, Qeq)); charset_table = charset_table_init; charset_table_size = ARRAYELTS (charset_table_init); diff --git a/src/coding.c b/src/coding.c index a16142a9b41..44c68e8b880 100644 --- a/src/coding.c +++ b/src/coding.c @@ -10818,20 +10818,15 @@ init_coding_once (void) void syms_of_coding (void) { - staticpro (&Vcoding_system_hash_table); - Vcoding_system_hash_table = CALLN (Fmake_hash_table, QCtest, Qeq); + staticpro (&Vcoding_system_hash_table, CALLN (Fmake_hash_table, QCtest, Qeq)); - staticpro (&Vsjis_coding_system); - Vsjis_coding_system = Qnil; + staticpro (&Vsjis_coding_system, Qnil); - staticpro (&Vbig5_coding_system); - Vbig5_coding_system = Qnil; + staticpro (&Vbig5_coding_system, Qnil); - staticpro (&Vcode_conversion_reused_workbuf); - Vcode_conversion_reused_workbuf = Qnil; + staticpro (&Vcode_conversion_reused_workbuf, Qnil); - staticpro (&Vcode_conversion_workbuf_name); - Vcode_conversion_workbuf_name = build_pure_c_string (" *code-conversion-work*"); + staticpro (&Vcode_conversion_workbuf_name, build_pure_c_string (" *code-conversion-work*")); reused_workbuf_in_use = 0; @@ -10914,9 +10909,7 @@ syms_of_coding (void) DEFSYM (QCpre_write_conversion, ":pre-write-conversion"); DEFSYM (QCascii_compatible_p, ":ascii-compatible-p"); - Vcoding_category_table - = Fmake_vector (make_number (coding_category_max), Qnil); - staticpro (&Vcoding_category_table); + staticpro (&Vcoding_category_table, Fmake_vector (make_number (coding_category_max), Qnil)); /* Followings are target of code detection. */ ASET (Vcoding_category_table, coding_category_iso_7, intern_c_string ("coding-category-iso-7")); @@ -11352,10 +11345,9 @@ internal character representation. */); Fset (AREF (Vcoding_category_table, i), Qno_conversion); #if defined (DOS_NT) - system_eol_type = Qdos; + staticpro (&system_eol_type, Qdos); #else - system_eol_type = Qunix; + staticpro (&system_eol_type, Qunix); #endif - staticpro (&system_eol_type); } #endif /* emacs */ diff --git a/src/composite.c b/src/composite.c index 746c2959f84..f7e95a0255b 100644 --- a/src/composite.c +++ b/src/composite.c @@ -1907,19 +1907,15 @@ syms_of_composite (void) and thus it's not worth to save memory in such a way. So, we make the table not weak. */ Lisp_Object args[] = {QCtest, Qequal, QCsize, make_number (311)}; - composition_hash_table = CALLMANY (Fmake_hash_table, args); - staticpro (&composition_hash_table); + staticpro (&composition_hash_table, CALLMANY (Fmake_hash_table, args)); /* Make a hash table for glyph-string. */ - gstring_hash_table = CALLMANY (Fmake_hash_table, args); - staticpro (&gstring_hash_table); + staticpro (&gstring_hash_table, CALLMANY (Fmake_hash_table, args)); - staticpro (&gstring_work_headers); - gstring_work_headers = make_uninit_vector (8); + staticpro (&gstring_work_headers, make_uninit_vector (8)); for (i = 0; i < 8; i++) ASET (gstring_work_headers, i, Fmake_vector (make_number (i + 2), Qnil)); - staticpro (&gstring_work); - gstring_work = Fmake_vector (make_number (10), Qnil); + staticpro (&gstring_work, Fmake_vector (make_number (10), Qnil)); /* Text property `composition' should be nonsticky by default. */ Vtext_property_default_nonsticky diff --git a/src/dbusbind.c b/src/dbusbind.c index ec3707d18f3..3af20551993 100644 --- a/src/dbusbind.c +++ b/src/dbusbind.c @@ -1824,8 +1824,7 @@ be called when the D-Bus reply message arrives. */); #endif /* Initialize internal objects. */ - xd_registered_buses = Qnil; - staticpro (&xd_registered_buses); + staticpro (&xd_registered_buses, Qnil); Fprovide (intern_c_string ("dbusbind"), Qnil); diff --git a/src/dispnew.c b/src/dispnew.c index 56f125218dc..608e1123459 100644 --- a/src/dispnew.c +++ b/src/dispnew.c @@ -6227,8 +6227,7 @@ syms_of_display (void) defsubr (&Sdump_redisplay_history); #endif - frame_and_buffer_state = Fmake_vector (make_number (20), Qlambda); - staticpro (&frame_and_buffer_state); + staticpro (&frame_and_buffer_state, Fmake_vector (make_number (20), Qlambda)); /* This is the "purpose" slot of a display table. */ DEFSYM (Qdisplay_table, "display-table"); diff --git a/src/emacs.c b/src/emacs.c index 8ea61b71fb7..3229c4d4648 100644 --- a/src/emacs.c +++ b/src/emacs.c @@ -2680,7 +2680,6 @@ libraries; only those already known by Emacs will be loaded. */); Fput (intern_c_string ("dynamic-library-alist"), Qrisky_local_variable, Qt); #ifdef WINDOWSNT - Vlibrary_cache = Qnil; - staticpro (&Vlibrary_cache); + staticpro (&Vlibrary_cache, Qnil); #endif } diff --git a/src/eval.c b/src/eval.c index a6e1d86c4ab..ba304ee8456 100644 --- a/src/eval.c +++ b/src/eval.c @@ -4107,13 +4107,10 @@ alist of active lexical bindings. */); (Just imagine if someone makes it buffer-local). */ Funintern (Qinternal_interpreter_environment, Qnil); - Vrun_hooks = intern_c_string ("run-hooks"); - staticpro (&Vrun_hooks); + staticpro (&Vrun_hooks, intern_c_string ("run-hooks")); - staticpro (&Vautoload_queue); - Vautoload_queue = Qnil; - staticpro (&Vsignaling_function); - Vsignaling_function = Qnil; + staticpro (&Vautoload_queue, Qnil); + staticpro (&Vsignaling_function, Qnil); inhibit_lisp_code = Qnil; diff --git a/src/fileio.c b/src/fileio.c index 52ca8b6297e..17230a82fb0 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -6091,8 +6091,7 @@ annotation functions in `write-region-annotate-functions' changed the current buffer, the function stored in this variable is called for each of those additional buffers as well, in addition to the original buffer. The relevant buffer is current during each function call. */); - Vwrite_region_post_annotation_function = Qnil; - staticpro (&Vwrite_region_annotation_buffers); + staticpro (&Vwrite_region_annotation_buffers, Qnil); DEFVAR_LISP ("write-region-annotations-so-far", Vwrite_region_annotations_so_far, diff --git a/src/fns.c b/src/fns.c index 94b9d984f0d..16c842b7a12 100644 --- a/src/fns.c +++ b/src/fns.c @@ -5178,11 +5178,9 @@ compilation. */); Voverriding_plist_environment = Qnil; DEFSYM (Qoverriding_plist_environment, "overriding-plist-environment"); - staticpro (&string_char_byte_cache_string); - string_char_byte_cache_string = Qnil; + staticpro (&string_char_byte_cache_string, Qnil); - require_nesting_list = Qnil; - staticpro (&require_nesting_list); + staticpro (&require_nesting_list, Qnil); Fset (Qyes_or_no_p_history, Qnil); diff --git a/src/font.c b/src/font.c index a6d3f5d4798..34ff23b40d0 100644 --- a/src/font.c +++ b/src/font.c @@ -5307,8 +5307,7 @@ syms_of_font (void) sort_shift_bits[FONT_WIDTH_INDEX] = 23; /* Note that the other elements in sort_shift_bits are not used. */ - staticpro (&font_charset_alist); - font_charset_alist = Qnil; + staticpro (&font_charset_alist, Qnil); DEFSYM (Qopentype, "opentype"); @@ -5346,13 +5345,10 @@ syms_of_font (void) DEFSYM (QCuser_spec, ":user-spec"); - staticpro (&scratch_font_spec); - scratch_font_spec = Ffont_spec (0, NULL); - staticpro (&scratch_font_prefer); - scratch_font_prefer = Ffont_spec (0, NULL); + staticpro (&scratch_font_spec, Ffont_spec (0, NULL)); + staticpro (&scratch_font_prefer, Ffont_spec (0, NULL)); - staticpro (&Vfont_log_deferred); - Vfont_log_deferred = Fmake_vector (make_number (3), Qnil); + staticpro (&Vfont_log_deferred, Fmake_vector (make_number (3), Qnil)); #if 0 #ifdef HAVE_LIBOTF @@ -5447,8 +5443,7 @@ This variable cannot be set; trying to do so will signal an error. */); Vfont_width_table = BUILD_STYLE_TABLE (width_table); make_symbol_constant (intern_c_string ("font-width-table")); - staticpro (&font_style_table); - font_style_table = make_uninit_vector (3); + staticpro (&font_style_table, make_uninit_vector (3)); ASET (font_style_table, 0, Vfont_weight_table); ASET (font_style_table, 1, Vfont_slant_table); ASET (font_style_table, 2, Vfont_width_table); diff --git a/src/fontset.c b/src/fontset.c index 6ca64068717..71dd45c3237 100644 --- a/src/fontset.c +++ b/src/fontset.c @@ -2116,14 +2116,11 @@ syms_of_fontset (void) DEFSYM (Qappend, "append"); DEFSYM (Qlatin, "latin"); - Vcached_fontset_data = Qnil; - staticpro (&Vcached_fontset_data); + staticpro (&Vcached_fontset_data, Qnil); - Vfontset_table = Fmake_vector (make_number (32), Qnil); - staticpro (&Vfontset_table); + staticpro (&Vfontset_table, Fmake_vector (make_number (32), Qnil)); - Vdefault_fontset = Fmake_char_table (Qfontset, Qnil); - staticpro (&Vdefault_fontset); + staticpro (&Vdefault_fontset, Fmake_char_table (Qfontset, Qnil)); set_fontset_id (Vdefault_fontset, make_number (0)); set_fontset_name (Vdefault_fontset, @@ -2131,8 +2128,7 @@ syms_of_fontset (void) ASET (Vfontset_table, 0, Vdefault_fontset); next_fontset_id = 1; - auto_fontset_alist = Qnil; - staticpro (&auto_fontset_alist); + staticpro (&auto_fontset_alist, Qnil); DEFVAR_LISP ("font-encoding-charset-alist", Vfont_encoding_charset_alist, doc: /* diff --git a/src/frame.c b/src/frame.c index 86caa32615d..40abef3a66b 100644 --- a/src/frame.c +++ b/src/frame.c @@ -6092,7 +6092,7 @@ making the child frame unresponsive to user actions, the default is to iconify the top level frame instead. */); iconify_child_frame = Qiconify_top_level; - staticpro (&Vframe_list); + staticpro (&Vframe_list, Qnil); defsubr (&Sframep); defsubr (&Sframe_live_p); diff --git a/src/ftfont.c b/src/ftfont.c index c2e093e633d..eaef4574b4e 100644 --- a/src/ftfont.c +++ b/src/ftfont.c @@ -2735,16 +2735,13 @@ syms_of_ftfont (void) DEFSYM (Qsans, "sans"); DEFSYM (Qsans__serif, "sans serif"); - staticpro (&freetype_font_cache); - freetype_font_cache = list1 (Qt); + staticpro (&freetype_font_cache, list1 (Qt)); - staticpro (&ftfont_generic_family_list); - ftfont_generic_family_list = list3 (Fcons (Qmonospace, Qt), - Fcons (Qsans_serif, Qt), - Fcons (Qsans, Qt)); + staticpro (&ftfont_generic_family_list, list3 (Fcons (Qmonospace, Qt), + Fcons (Qsans_serif, Qt), + Fcons (Qsans, Qt))); - staticpro (&ft_face_cache); - ft_face_cache = Qnil; + staticpro (&ft_face_cache, Qnil); register_font_driver (&ftfont_driver, NULL); } diff --git a/src/gfilenotify.c b/src/gfilenotify.c index 650df0fcbb5..63bfdb49460 100644 --- a/src/gfilenotify.c +++ b/src/gfilenotify.c @@ -331,7 +331,7 @@ syms_of_gfilenotify (void) DEFSYM (Qunmounted, "unmounted"); /* G_FILE_MONITOR_EVENT_UNMOUNTED */ DEFSYM (Qmoved, "moved"); /* G_FILE_MONITOR_EVENT_MOVED */ - staticpro (&watch_list); + staticpro (&watch_list, Qnil); Fprovide (intern_c_string ("gfilenotify"), Qnil); diff --git a/src/inotify.c b/src/inotify.c index e06cc97c6a7..b10d218b4db 100644 --- a/src/inotify.c +++ b/src/inotify.c @@ -546,7 +546,7 @@ syms_of_inotify (void) defsubr (&Sinotify_watch_list); defsubr (&Sinotify_allocated_p); #endif - staticpro (&watch_list); + staticpro (&watch_list, Qnil); Fprovide (intern_c_string ("inotify"), Qnil); } diff --git a/src/insdel.c b/src/insdel.c index 02e3f41bc9f..e9279f0a166 100644 --- a/src/insdel.c +++ b/src/insdel.c @@ -2328,10 +2328,8 @@ DEFUN ("combine-after-change-execute", Fcombine_after_change_execute, void syms_of_insdel (void) { - staticpro (&combine_after_change_list); - staticpro (&combine_after_change_buffer); - combine_after_change_list = Qnil; - combine_after_change_buffer = Qnil; + staticpro (&combine_after_change_list, Qnil); + staticpro (&combine_after_change_buffer, Qnil); DEFSYM (Qundo_auto__undoable_change, "undo-auto--undoable-change"); diff --git a/src/keyboard.c b/src/keyboard.c index c0c863f0d3e..a3a61ed0c63 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -11051,11 +11051,9 @@ static const struct event_head head_table[] = { void syms_of_keyboard (void) { - pending_funcalls = Qnil; - staticpro (&pending_funcalls); + staticpro (&pending_funcalls, Qnil); - Vlispy_mouse_stem = build_pure_c_string ("mouse"); - staticpro (&Vlispy_mouse_stem); + staticpro (&Vlispy_mouse_stem, build_pure_c_string ("mouse")); regular_top_level_message = build_pure_c_string ("Back to top level"); #ifdef HAVE_STACK_OVERFLOW_HANDLING @@ -11071,13 +11069,10 @@ syms_of_keyboard (void) DEFSYM (Qhelp_echo, "help-echo"); DEFSYM (QCrtl, ":rtl"); - staticpro (&item_properties); - item_properties = Qnil; + staticpro (&item_properties, Qnil); - staticpro (&tool_bar_item_properties); - tool_bar_item_properties = Qnil; - staticpro (&tool_bar_items_vector); - tool_bar_items_vector = Qnil; + staticpro (&tool_bar_item_properties, Qnil); + staticpro (&tool_bar_items_vector, Qnil); DEFSYM (Qtimer_event_handler, "timer-event-handler"); @@ -11242,65 +11237,48 @@ syms_of_keyboard (void) } } - button_down_location = Fmake_vector (make_number (5), Qnil); - staticpro (&button_down_location); - mouse_syms = Fmake_vector (make_number (5), Qnil); - staticpro (&mouse_syms); - wheel_syms = Fmake_vector (make_number (ARRAYELTS (lispy_wheel_names)), - Qnil); - staticpro (&wheel_syms); + staticpro (&button_down_location, Fmake_vector (make_number (5), Qnil)); + staticpro (&mouse_syms, Fmake_vector (make_number (5), Qnil)); + staticpro (&wheel_syms, Fmake_vector (make_number (ARRAYELTS (lispy_wheel_names)), + Qnil)); { int i; int len = ARRAYELTS (modifier_names); - modifier_symbols = Fmake_vector (make_number (len), Qnil); + staticpro (&modifier_symbols, Fmake_vector (make_number (len), Qnil)); for (i = 0; i < len; i++) if (modifier_names[i]) ASET (modifier_symbols, i, intern_c_string (modifier_names[i])); - staticpro (&modifier_symbols); } - recent_keys = Fmake_vector (make_number (NUM_RECENT_KEYS), Qnil); - staticpro (&recent_keys); + staticpro (&recent_keys, Fmake_vector (make_number (NUM_RECENT_KEYS), Qnil)); - this_command_keys = Fmake_vector (make_number (40), Qnil); - staticpro (&this_command_keys); + staticpro (&this_command_keys, Fmake_vector (make_number (40), Qnil)); - raw_keybuf = Fmake_vector (make_number (30), Qnil); - staticpro (&raw_keybuf); + staticpro (&raw_keybuf, Fmake_vector (make_number (30), Qnil)); DEFSYM (Qcommand_execute, "command-execute"); DEFSYM (Qinternal_echo_keystrokes_prefix, "internal-echo-keystrokes-prefix"); - accent_key_syms = Qnil; - staticpro (&accent_key_syms); + staticpro (&accent_key_syms, Qnil); - func_key_syms = Qnil; - staticpro (&func_key_syms); + staticpro (&func_key_syms, Qnil); - drag_n_drop_syms = Qnil; - staticpro (&drag_n_drop_syms); + staticpro (&drag_n_drop_syms, Qnil); - unread_switch_frame = Qnil; - staticpro (&unread_switch_frame); + staticpro (&unread_switch_frame, Qnil); - internal_last_event_frame = Qnil; - staticpro (&internal_last_event_frame); + staticpro (&internal_last_event_frame, Qnil); - read_key_sequence_cmd = Qnil; - staticpro (&read_key_sequence_cmd); - read_key_sequence_remapped = Qnil; - staticpro (&read_key_sequence_remapped); + staticpro (&read_key_sequence_cmd, Qnil); + staticpro (&read_key_sequence_remapped, Qnil); - menu_bar_one_keymap_changed_items = Qnil; - staticpro (&menu_bar_one_keymap_changed_items); + staticpro (&menu_bar_one_keymap_changed_items, Qnil); - menu_bar_items_vector = Qnil; - staticpro (&menu_bar_items_vector); + staticpro (&menu_bar_items_vector, Qnil); - help_form_saved_window_configs = Qnil; - staticpro (&help_form_saved_window_configs); + staticpro (&help_form_saved_window_configs, Qnil); defsubr (&Scurrent_idle_time); defsubr (&Sevent_symbol_parse_modifiers); diff --git a/src/keymap.c b/src/keymap.c index c8cc933e782..7e8b548317e 100644 --- a/src/keymap.c +++ b/src/keymap.c @@ -3599,10 +3599,8 @@ void syms_of_keymap (void) { DEFSYM (Qkeymap, "keymap"); - staticpro (&apropos_predicate); - staticpro (&apropos_accumulate); - apropos_predicate = Qnil; - apropos_accumulate = Qnil; + staticpro (&apropos_predicate, Qnil); + staticpro (&apropos_accumulate, Qnil); DEFSYM (Qkeymap_canonicalize, "keymap-canonicalize"); @@ -3614,13 +3612,10 @@ syms_of_keymap (void) Each one is the value of a Lisp variable, and is also pointed to by a C variable */ - global_map = Fmake_keymap (Qnil); + staticpro (&global_map, Fmake_keymap (Qnil)); + staticpro (¤t_global_map, global_map); Fset (intern_c_string ("global-map"), global_map); - current_global_map = global_map; - staticpro (&global_map); - staticpro (¤t_global_map); - meta_map = Fmake_keymap (Qnil); Fset (intern_c_string ("esc-map"), meta_map); Ffset (intern_c_string ("ESC-prefix"), meta_map); @@ -3629,13 +3624,13 @@ syms_of_keymap (void) Fset (intern_c_string ("ctl-x-map"), control_x_map); Ffset (intern_c_string ("Control-X-prefix"), control_x_map); - exclude_keys = listn (CONSTYPE_PURE, 5, - pure_cons (build_pure_c_string ("DEL"), build_pure_c_string ("\\d")), - pure_cons (build_pure_c_string ("TAB"), build_pure_c_string ("\\t")), - pure_cons (build_pure_c_string ("RET"), build_pure_c_string ("\\r")), - pure_cons (build_pure_c_string ("ESC"), build_pure_c_string ("\\e")), - pure_cons (build_pure_c_string ("SPC"), build_pure_c_string (" "))); - staticpro (&exclude_keys); + staticpro (&exclude_keys, + listn (CONSTYPE_PURE, 5, + pure_cons (build_pure_c_string ("DEL"), build_pure_c_string ("\\d")), + pure_cons (build_pure_c_string ("TAB"), build_pure_c_string ("\\t")), + pure_cons (build_pure_c_string ("RET"), build_pure_c_string ("\\r")), + pure_cons (build_pure_c_string ("ESC"), build_pure_c_string ("\\e")), + pure_cons (build_pure_c_string ("SPC"), build_pure_c_string (" ")))); DEFVAR_LISP ("define-key-rebound-commands", Vdefine_key_rebound_commands, doc: /* List of commands given new key bindings recently. @@ -3689,17 +3684,16 @@ be preferred. */); DEFSYM (Qmenu_bar, "menu-bar"); DEFSYM (Qmode_line, "mode-line"); - staticpro (&Vmouse_events); - Vmouse_events = listn (CONSTYPE_PURE, 9, - Qmenu_bar, - Qtool_bar, - Qheader_line, - Qmode_line, - intern_c_string ("mouse-1"), - intern_c_string ("mouse-2"), - intern_c_string ("mouse-3"), - intern_c_string ("mouse-4"), - intern_c_string ("mouse-5")); + staticpro (&Vmouse_events, listn (CONSTYPE_PURE, 9, + Qmenu_bar, + Qtool_bar, + Qheader_line, + Qmode_line, + intern_c_string ("mouse-1"), + intern_c_string ("mouse-2"), + intern_c_string ("mouse-3"), + intern_c_string ("mouse-4"), + intern_c_string ("mouse-5"))); /* Keymap used for minibuffers when doing completion. */ /* Keymap used for minibuffers when doing completion and require a match. */ @@ -3709,13 +3703,11 @@ be preferred. */); DEFSYM (Qremap, "remap"); DEFSYM (QCadvertised_binding, ":advertised-binding"); - command_remapping_vector = Fmake_vector (make_number (2), Qremap); - staticpro (&command_remapping_vector); + staticpro (&command_remapping_vector, + Fmake_vector (make_number (2), Qremap)); - where_is_cache_keymaps = Qt; - where_is_cache = Qnil; - staticpro (&where_is_cache); - staticpro (&where_is_cache_keymaps); + staticpro (&where_is_cache, Qnil); + staticpro (&where_is_cache_keymaps, Qt); defsubr (&Skeymapp); defsubr (&Skeymap_parent); diff --git a/src/kqueue.c b/src/kqueue.c index 7a4f6a471c4..185e0e35820 100644 --- a/src/kqueue.c +++ b/src/kqueue.c @@ -527,7 +527,7 @@ syms_of_kqueue (void) DEFSYM (Qlink, "link"); /* NOTE_LINK */ DEFSYM (Qrename, "rename"); /* NOTE_RENAME */ - staticpro (&watch_list); + staticpro (&watch_list, Qnil); Fprovide (intern_c_string ("kqueue"), Qnil); } diff --git a/src/lisp.h b/src/lisp.h index b931d23bf38..19a8a8027e3 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -3281,7 +3281,23 @@ extern Lisp_Object Vascii_canon_table; /* Call staticpro (&var) to protect static variable `var'. */ -void staticpro (Lisp_Object *); +void staticpro_1 (Lisp_Object *); + +INLINE void +staticpro (Lisp_Object *ptr, Lisp_Object initial_value) +{ + eassume (*ptr == Qnil); +#if 4 < __GNUC__ + if (__builtin_constant_p(initial_value == Qnil) && + initial_value == Qnil) + ; + else +#endif + *ptr = initial_value; + + staticpro_1 (ptr); +} + /* Forward declarations for prototypes. */ struct window; diff --git a/src/lread.c b/src/lread.c index 8fb61f56338..e63d7431e46 100644 --- a/src/lread.c +++ b/src/lread.c @@ -4344,8 +4344,7 @@ void init_obarray (void) { Vobarray = Fmake_vector (make_number (OBARRAY_SIZE), make_number (0)); - initial_obarray = Vobarray; - staticpro (&initial_obarray); + staticpro (&initial_obarray, Vobarray); for (int i = 0; i < ARRAYELTS (lispsym); i++) define_symbol (builtin_lisp_symbol (i), defsym_name[i]); @@ -4443,7 +4442,7 @@ defvar_lisp (struct Lisp_Objfwd *o_fwd, const char *namestring, Lisp_Object *address) { defvar_lisp_nopro (o_fwd, namestring, address); - staticpro (address); + staticpro (address, Qnil); } /* Similar but define a variable whose value is the Lisp Object stored @@ -5089,13 +5088,10 @@ this variable will become obsolete. */); DEFSYM (Qdir_ok, "dir-ok"); DEFSYM (Qdo_after_load_evaluation, "do-after-load-evaluation"); - staticpro (&read_objects_map); - read_objects_map = Qnil; - staticpro (&read_objects_completed); - read_objects_completed = Qnil; + staticpro (&read_objects_map, Qnil); + staticpro (&read_objects_completed, Qnil); - Vloads_in_progress = Qnil; - staticpro (&Vloads_in_progress); + staticpro (&Vloads_in_progress, Qnil); DEFSYM (Qhash_table, "hash-table"); DEFSYM (Qdata, "data"); diff --git a/src/macfont.m b/src/macfont.m index 817071fa44f..5953ce7fd23 100644 --- a/src/macfont.m +++ b/src/macfont.m @@ -4050,6 +4050,5 @@ So we use CTFontDescriptorCreateMatchingFontDescriptor (no /* The boolean-valued font property key specifying the use of leading. */ DEFSYM (QCminspace, ":minspace"); - macfont_family_cache = Qnil; - staticpro (&macfont_family_cache); + staticpro (&macfont_family_cache, Qnil); } diff --git a/src/menu.c b/src/menu.c index 93e793a5d91..3be8ecd5fab 100644 --- a/src/menu.c +++ b/src/menu.c @@ -1580,8 +1580,7 @@ for instance using the window manager, then this produces a quit and void syms_of_menu (void) { - staticpro (&menu_items); - menu_items = Qnil; + staticpro (&menu_items, Qnil); menu_items_inuse = Qnil; defsubr (&Sx_popup_menu); diff --git a/src/minibuf.c b/src/minibuf.c index 45cf15224a5..11c6b94ae5d 100644 --- a/src/minibuf.c +++ b/src/minibuf.c @@ -1908,19 +1908,16 @@ If no minibuffer is active, return nil. */) void init_minibuf_once (void) { - Vminibuffer_list = Qnil; - staticpro (&Vminibuffer_list); + staticpro (&Vminibuffer_list, Qnil); } void syms_of_minibuf (void) { minibuf_level = 0; - minibuf_prompt = Qnil; - staticpro (&minibuf_prompt); + staticpro (&minibuf_prompt, Qnil); - minibuf_save_list = Qnil; - staticpro (&minibuf_save_list); + staticpro (&minibuf_save_list, Qnil); DEFSYM (Qcompletion_ignore_case, "completion-ignore-case"); DEFSYM (Qminibuffer_default, "minibuffer-default"); @@ -1928,8 +1925,7 @@ syms_of_minibuf (void) DEFSYM (Qminibuffer_completion_table, "minibuffer-completion-table"); - staticpro (&last_minibuf_string); - last_minibuf_string = Qnil; + staticpro (&last_minibuf_string, Qnil); DEFSYM (Qminibuffer_history, "minibuffer-history"); DEFSYM (Qbuffer_name_history, "buffer-name-history"); diff --git a/src/msdos.c b/src/msdos.c index eedbf7b1a6c..7ca6d03917a 100644 --- a/src/msdos.c +++ b/src/msdos.c @@ -4196,8 +4196,7 @@ msdos_fatal_signal (int sig) void syms_of_msdos (void) { - recent_doskeys = Fmake_vector (make_number (NUM_RECENT_DOSKEYS), Qnil); - staticpro (&recent_doskeys); + staticpro (&recent_doskeys, Fmake_vector (make_number (NUM_RECENT_DOSKEYS), Qnil)); #ifndef HAVE_X_WINDOWS diff --git a/src/nsselect.m b/src/nsselect.m index c72f179ab38..6d0b6342dc2 100644 --- a/src/nsselect.m +++ b/src/nsselect.m @@ -492,8 +492,7 @@ Updated by Christian Limpach (address@hidden) defsubr (&Sns_selection_exists_p); defsubr (&Sns_selection_owner_p); - Vselection_alist = Qnil; - staticpro (&Vselection_alist); + staticpro (&Vselection_alist, Qnil); DEFVAR_LISP ("ns-sent-selection-hooks", Vns_sent_selection_hooks, "A list of functions to be called when Emacs answers a selection request.\n\ diff --git a/src/print.c b/src/print.c index a8bbb9d37a1..6867981102b 100644 --- a/src/print.c +++ b/src/print.c @@ -2435,7 +2435,7 @@ priorities. */); Vprint_charset_text_property = Qdefault; /* prin1_to_string_buffer initialized in init_buffer_once in buffer.c */ - staticpro (&Vprin1_to_string_buffer); + staticpro (&Vprin1_to_string_buffer, Qnil); defsubr (&Sprin1); defsubr (&Sprin1_to_string); @@ -2452,6 +2452,5 @@ priorities. */); DEFSYM (Qprint_escape_nonascii, "print-escape-nonascii"); DEFSYM (Qprint_escape_control_characters, "print-escape-control-characters"); - print_prune_charset_plist = Qnil; - staticpro (&print_prune_charset_plist); + staticpro (&print_prune_charset_plist, Qnil); } diff --git a/src/process.c b/src/process.c index ed2cab7b51f..25634f753e3 100644 --- a/src/process.c +++ b/src/process.c @@ -8149,8 +8149,8 @@ syms_of_process (void) DEFSYM (Qlast_nonmenu_event, "last-nonmenu-event"); - staticpro (&Vprocess_alist); - staticpro (&deleted_pid_list); + staticpro (&Vprocess_alist, Qnil); + staticpro (&deleted_pid_list, Qnil); #endif /* subprocesses */ diff --git a/src/profiler.c b/src/profiler.c index 312574d7526..b1e54b6a748 100644 --- a/src/profiler.c +++ b/src/profiler.c @@ -595,16 +595,14 @@ to make room for new entries. */); #ifdef PROFILER_CPU_SUPPORT profiler_cpu_running = NOT_RUNNING; - cpu_log = Qnil; - staticpro (&cpu_log); + staticpro (&cpu_log, Qnil); defsubr (&Sprofiler_cpu_start); defsubr (&Sprofiler_cpu_stop); defsubr (&Sprofiler_cpu_running_p); defsubr (&Sprofiler_cpu_log); #endif profiler_memory_running = false; - memory_log = Qnil; - staticpro (&memory_log); + staticpro (&memory_log, Qnil); defsubr (&Sprofiler_memory_start); defsubr (&Sprofiler_memory_stop); defsubr (&Sprofiler_memory_running_p); diff --git a/src/search.c b/src/search.c index 842e9309a2e..aa4e39bdbbc 100644 --- a/src/search.c +++ b/src/search.c @@ -3367,12 +3367,9 @@ syms_of_search (void) searchbufs[i].buf.allocated = 100; searchbufs[i].buf.buffer = xmalloc (100); searchbufs[i].buf.fastmap = searchbufs[i].fastmap; - searchbufs[i].regexp = Qnil; - searchbufs[i].f_whitespace_regexp = Qnil; - searchbufs[i].syntax_table = Qnil; - staticpro (&searchbufs[i].regexp); - staticpro (&searchbufs[i].f_whitespace_regexp); - staticpro (&searchbufs[i].syntax_table); + staticpro (&searchbufs[i].regexp, Qnil); + staticpro (&searchbufs[i].f_whitespace_regexp, Qnil); + staticpro (&searchbufs[i].syntax_table, Qnil); searchbufs[i].next = (i == REGEXP_CACHE_SIZE-1 ? 0 : &searchbufs[i+1]); } searchbuf_head = &searchbufs[0]; @@ -3403,11 +3400,9 @@ syms_of_search (void) Fput (Qinvalid_regexp, Qerror_message, build_pure_c_string ("Invalid regexp")); - last_thing_searched = Qnil; - staticpro (&last_thing_searched); + staticpro (&last_thing_searched, Qnil); - saved_last_thing_searched = Qnil; - staticpro (&saved_last_thing_searched); + staticpro (&saved_last_thing_searched, Qnil); DEFVAR_LISP ("search-spaces-regexp", Vsearch_spaces_regexp, doc: /* Regexp to substitute for bunches of spaces in regexp search. diff --git a/src/syntax.c b/src/syntax.c index c5a4b03955b..3ab82ad5d64 100644 --- a/src/syntax.c +++ b/src/syntax.c @@ -3722,15 +3722,15 @@ syms_of_syntax (void) doc: /* Non-nil means `forward-comment' can use `syntax-ppss' internally. */); Vcomment_use_syntax_ppss = Qt; - staticpro (&Vsyntax_code_object); + staticpro (&Vsyntax_code_object, Qnil); - staticpro (&gl_state.object); - staticpro (&gl_state.global_code); - staticpro (&gl_state.current_syntax_table); - staticpro (&gl_state.old_prop); + staticpro (&gl_state.object, Qnil); + staticpro (&gl_state.global_code, Qnil); + staticpro (&gl_state.current_syntax_table, Qnil); + staticpro (&gl_state.old_prop, Qnil); /* Defined in regex.c. */ - staticpro (&re_match_object); + staticpro (&re_match_object, Qnil); DEFSYM (Qscan_error, "scan-error"); Fput (Qscan_error, Qerror_conditions, diff --git a/src/textprop.c b/src/textprop.c index 984f2e66406..7f7d7359ffc 100644 --- a/src/textprop.c +++ b/src/textprop.c @@ -2340,10 +2340,8 @@ inherits it if NONSTICKINESS is nil. The `front-sticky' and Vtext_property_default_nonsticky = list2 (Fcons (Qsyntax_table, Qt), Fcons (Qdisplay, Qt)); - staticpro (&interval_insert_behind_hooks); - staticpro (&interval_insert_in_front_hooks); - interval_insert_behind_hooks = Qnil; - interval_insert_in_front_hooks = Qnil; + staticpro (&interval_insert_behind_hooks, Qnil); + staticpro (&interval_insert_in_front_hooks, Qnil); /* Common attributes one might give text. */ diff --git a/src/thread.c b/src/thread.c index f11e3e5addb..fe0c8688415 100644 --- a/src/thread.c +++ b/src/thread.c @@ -1074,8 +1074,7 @@ syms_of_threads (void) defsubr (&Scondition_name); defsubr (&Sthread_last_error); - staticpro (&last_thread_error); - last_thread_error = Qnil; + staticpro (&last_thread_error, Qnil); } DEFSYM (Qthreadp, "threadp"); diff --git a/src/undo.c b/src/undo.c index c34faa42720..a34dd486094 100644 --- a/src/undo.c +++ b/src/undo.c @@ -430,8 +430,7 @@ syms_of_undo (void) /* Marker for function call undo list elements. */ DEFSYM (Qapply, "apply"); - pending_boundary = Qnil; - staticpro (&pending_boundary); + staticpro (&pending_boundary, Qnil); defsubr (&Sundo_boundary); diff --git a/src/w32fns.c b/src/w32fns.c index 2b920f29c65..5903b2a1557 100644 --- a/src/w32fns.c +++ b/src/w32fns.c @@ -10164,8 +10164,7 @@ syms_of_w32fns (void) Fput (Qundefined_color, Qerror_message, build_pure_c_string ("Undefined color")); - staticpro (&w32_grabbed_keys); - w32_grabbed_keys = Qnil; + staticpro (&w32_grabbed_keys, Qnil); DEFVAR_LISP ("w32-color-map", Vw32_color_map, doc: /* An array of color name mappings for Windows. */); @@ -10515,16 +10514,11 @@ tip frame. */); defsubr (&Sset_message_beep); defsubr (&Sx_show_tip); defsubr (&Sx_hide_tip); - tip_timer = Qnil; - staticpro (&tip_timer); - tip_frame = Qnil; - staticpro (&tip_frame); - tip_last_frame = Qnil; - staticpro (&tip_last_frame); - tip_last_string = Qnil; - staticpro (&tip_last_string); - tip_last_parms = Qnil; - staticpro (&tip_last_parms); + staticpro (&tip_timer, Qnil); + staticpro (&tip_frame, Qnil); + staticpro (&tip_last_frame, Qnil); + staticpro (&tip_last_string, Qnil); + staticpro (&tip_last_parms, Qnil); defsubr (&Sx_file_dialog); #ifdef WINDOWSNT diff --git a/src/w32proc.c b/src/w32proc.c index 28d7b6611f6..83b8ef7f56d 100644 --- a/src/w32proc.c +++ b/src/w32proc.c @@ -3826,7 +3826,7 @@ in the strings. So do NOT use this option when comparing file names for equality, only when you need to sort them. */); Vw32_collate_ignore_punctuation = Qnil; - staticpro (&Vw32_valid_locale_ids); - staticpro (&Vw32_valid_codepages); + staticpro (&Vw32_valid_locale_ids, Qnil); + staticpro (&Vw32_valid_codepages, Qnil); } /* end of w32proc.c */ diff --git a/src/w32select.c b/src/w32select.c index a9df3f770b7..cd1bf6a60cb 100644 --- a/src/w32select.c +++ b/src/w32select.c @@ -1181,13 +1181,13 @@ syms_of_w32select (void) DEFSYM (QCLIPBOARD, "CLIPBOARD"); - cfg_coding_system = Qnil; staticpro (&cfg_coding_system); - current_text = Qnil; staticpro (¤t_text); - current_coding_system = Qnil; staticpro (¤t_coding_system); + staticpro (&cfg_coding_system, Qnil); + staticpro (¤t_text, Qnil); + staticpro (¤t_coding_system, Qnil); DEFSYM (Qutf_16le_dos, "utf-16le-dos"); - QANSICP = Qnil; staticpro (&QANSICP); - QOEMCP = Qnil; staticpro (&QOEMCP); + staticpro (&QANSICP, Qnil); + staticpro (&QOEMCP, Qnil); } /* One-time init. Called in the dumped Emacs, but not in the diff --git a/src/window.c b/src/window.c index e6d0280d9b0..581d529bf8c 100644 --- a/src/window.c +++ b/src/window.c @@ -7566,10 +7566,8 @@ syms_of_window (void) DEFSYM (Qmode_line_format, "mode-line-format"); DEFSYM (Qheader_line_format, "header-line-format"); - staticpro (&Vwindow_list); - - minibuf_selected_window = Qnil; - staticpro (&minibuf_selected_window); + staticpro (&Vwindow_list, Qnil); + staticpro (&minibuf_selected_window, Qnil); window_scroll_pixel_based_preserve_x = -1; window_scroll_pixel_based_preserve_y = -1; diff --git a/src/xdisp.c b/src/xdisp.c index df5335e4acc..e194f767dae 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -32418,11 +32418,9 @@ x_intersect_rectangles (XRectangle *r1, XRectangle *r2, XRectangle *result) void syms_of_xdisp (void) { - Vwith_echo_area_save_vector = Qnil; - staticpro (&Vwith_echo_area_save_vector); + staticpro (&Vwith_echo_area_save_vector, Qnil); - Vmessage_stack = Qnil; - staticpro (&Vmessage_stack); + staticpro (&Vmessage_stack, Qnil); /* Non-nil means don't actually do any redisplay. */ DEFSYM (Qinhibit_redisplay, "inhibit-redisplay"); @@ -32434,12 +32432,9 @@ syms_of_xdisp (void) They are still logged to the *Messages* buffer. */); inhibit_message = 0; - message_dolog_marker1 = Fmake_marker (); - staticpro (&message_dolog_marker1); - message_dolog_marker2 = Fmake_marker (); - staticpro (&message_dolog_marker2); - message_dolog_marker3 = Fmake_marker (); - staticpro (&message_dolog_marker3); + staticpro (&message_dolog_marker1, Fmake_marker ()); + staticpro (&message_dolog_marker2, Fmake_marker ()); + staticpro (&message_dolog_marker3, Fmake_marker ()); defsubr (&Sset_buffer_redisplay); #ifdef GLYPH_DEBUG @@ -32553,8 +32548,7 @@ They are still logged to the *Messages* buffer. */); DEFSYM (Qinhibit_free_realized_faces, "inhibit-free-realized-faces"); - list_of_error = list1 (list2 (Qerror, Qvoid_variable)); - staticpro (&list_of_error); + staticpro (&list_of_error, list1 (list2 (Qerror, Qvoid_variable))); /* Values of those variables at last redisplay are stored as properties on 'overlay-arrow-position' symbol. However, if @@ -32568,38 +32562,26 @@ They are still logged to the *Messages* buffer. */); DEFSYM (Qoverlay_arrow_string, "overlay-arrow-string"); DEFSYM (Qoverlay_arrow_bitmap, "overlay-arrow-bitmap"); - echo_buffer[0] = echo_buffer[1] = Qnil; - staticpro (&echo_buffer[0]); - staticpro (&echo_buffer[1]); + staticpro (&echo_buffer[0], Qnil); + staticpro (&echo_buffer[1], Qnil); - echo_area_buffer[0] = echo_area_buffer[1] = Qnil; - staticpro (&echo_area_buffer[0]); - staticpro (&echo_area_buffer[1]); + staticpro (&echo_area_buffer[0], Qnil); + staticpro (&echo_area_buffer[1], Qnil); - Vmessages_buffer_name = build_pure_c_string ("*Messages*"); - staticpro (&Vmessages_buffer_name); + staticpro (&Vmessages_buffer_name, build_pure_c_string ("*Messages*")); - mode_line_proptrans_alist = Qnil; - staticpro (&mode_line_proptrans_alist); - mode_line_string_list = Qnil; - staticpro (&mode_line_string_list); - mode_line_string_face = Qnil; - staticpro (&mode_line_string_face); - mode_line_string_face_prop = Qnil; - staticpro (&mode_line_string_face_prop); - Vmode_line_unwind_vector = Qnil; - staticpro (&Vmode_line_unwind_vector); + staticpro (&mode_line_proptrans_alist, Qnil); + staticpro (&mode_line_string_list, Qnil); + staticpro (&mode_line_string_face, Qnil); + staticpro (&mode_line_string_face_prop, Qnil); + staticpro (&Vmode_line_unwind_vector, Qnil); DEFSYM (Qmode_line_default_help_echo, "mode-line-default-help-echo"); - help_echo_string = Qnil; - staticpro (&help_echo_string); - help_echo_object = Qnil; - staticpro (&help_echo_object); - help_echo_window = Qnil; - staticpro (&help_echo_window); - previous_help_echo_string = Qnil; - staticpro (&previous_help_echo_string); + staticpro (&help_echo_string, Qnil); + staticpro (&help_echo_object, Qnil); + staticpro (&help_echo_window, Qnil); + staticpro (&previous_help_echo_string, Qnil); help_echo_pos = -1; DEFSYM (Qright_to_left, "right-to-left"); diff --git a/src/xfaces.c b/src/xfaces.c index a9c2f37e9f2..89c1065750e 100644 --- a/src/xfaces.c +++ b/src/xfaces.c @@ -6451,12 +6451,9 @@ syms_of_xfaces (void) /* The name of the function used to compute colors on TTYs. */ DEFSYM (Qtty_color_alist, "tty-color-alist"); - Vparam_value_alist = list1 (Fcons (Qnil, Qnil)); - staticpro (&Vparam_value_alist); - Vface_alternative_font_family_alist = Qnil; - staticpro (&Vface_alternative_font_family_alist); - Vface_alternative_font_registry_alist = Qnil; - staticpro (&Vface_alternative_font_registry_alist); + staticpro (&Vparam_value_alist, list1 (Fcons (Qnil, Qnil))); + staticpro (&Vface_alternative_font_family_alist, Qnil); + staticpro (&Vface_alternative_font_registry_alist, Qnil); defsubr (&Sinternal_make_lisp_face); defsubr (&Sinternal_lisp_face_p); diff --git a/src/xfns.c b/src/xfns.c index 78151c81380..38d9f91dc89 100644 --- a/src/xfns.c +++ b/src/xfns.c @@ -7926,16 +7926,11 @@ When using Gtk+ tooltips, the tooltip face is not used. */); defsubr (&Sx_show_tip); defsubr (&Sx_hide_tip); defsubr (&Sx_double_buffered_p); - tip_timer = Qnil; - staticpro (&tip_timer); - tip_frame = Qnil; - staticpro (&tip_frame); - tip_last_frame = Qnil; - staticpro (&tip_last_frame); - tip_last_string = Qnil; - staticpro (&tip_last_string); - tip_last_parms = Qnil; - staticpro (&tip_last_parms); + staticpro (&tip_timer, Qnil); + staticpro (&tip_frame, Qnil); + staticpro (&tip_last_frame, Qnil); + staticpro (&tip_last_string, Qnil); + staticpro (&tip_last_parms, Qnil); defsubr (&Sx_uses_old_gtk_dialog); #if defined (USE_MOTIF) || defined (USE_GTK) diff --git a/src/xfont.c b/src/xfont.c index c2e416bc058..a67237aa2aa 100644 --- a/src/xfont.c +++ b/src/xfont.c @@ -1098,9 +1098,7 @@ struct font_driver const xfont_driver = void syms_of_xfont (void) { - staticpro (&xfont_scripts_cache); - xfont_scripts_cache = CALLN (Fmake_hash_table, QCtest, Qequal); - staticpro (&xfont_scratch_props); - xfont_scratch_props = Fmake_vector (make_number (8), Qnil); + staticpro (&xfont_scripts_cache, CALLN (Fmake_hash_table, QCtest, Qequal)); + staticpro (&xfont_scratch_props, Fmake_vector (make_number (8), Qnil)); register_font_driver (&xfont_driver, NULL); } diff --git a/src/xselect.c b/src/xselect.c index ecf59df2943..538b555f643 100644 --- a/src/xselect.c +++ b/src/xselect.c @@ -2633,15 +2633,13 @@ syms_of_xselect (void) defsubr (&Sx_send_client_message); defsubr (&Sx_register_dnd_atom); - reading_selection_reply = Fcons (Qnil, Qnil); - staticpro (&reading_selection_reply); + staticpro (&reading_selection_reply, Fcons (Qnil, Qnil)); reading_selection_window = 0; reading_which_selection = 0; property_change_wait_list = 0; prop_location_identifier = 0; - property_change_reply = Fcons (Qnil, Qnil); - staticpro (&property_change_reply); + staticpro (&property_change_reply, Fcons (Qnil, Qnil)); converted_selections = NULL; conversion_fail_tag = None; diff --git a/src/xterm.c b/src/xterm.c index 6ab4a03002d..d1c3797cf06 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -13257,8 +13257,7 @@ syms_of_xterm (void) DEFSYM (Qlatin_1, "latin-1"); #ifdef USE_GTK - xg_default_icon_file = build_pure_c_string ("icons/hicolor/scalable/apps/emacs.svg"); - staticpro (&xg_default_icon_file); + staticpro (&xg_default_icon_file, build_pure_c_string ("icons/hicolor/scalable/apps/emacs.svg")); DEFSYM (Qx_gtk_map_stock, "x-gtk-map-stock"); #endif