Commit 5f99d515 authored by Paul Eggert's avatar Paul Eggert

Avoid staticvec duplicates

* src/alloc.c (staticpro) [ENABLE_CHECKING]: Check for duplicates.
* src/keyboard.c (syms_of_keyboard): Define
while-no-input-ignore-events and inhibit--record-char here ...
(syms_of_keyboard_for_pdumper): ... instead of here.
This avoids duplicates in staticvec.
parent 954c9c5b
Pipeline #902 failed with stage
in 48 minutes and 58 seconds
......@@ -5725,6 +5725,8 @@ purecopy (Lisp_Object obj)
void
staticpro (Lisp_Object *varaddress)
{
for (int i = 0; i < staticidx; i++)
eassert (staticvec[i] != varaddress);
if (staticidx >= NSTATICS)
fatal ("NSTATICS too small; try increasing and recompiling Emacs.");
staticvec[staticidx++] = varaddress;
......
......@@ -11844,6 +11844,17 @@ preserve data in modified buffers that would otherwise be lost.
If nil, Emacs crashes immediately in response to fatal signals. */);
attempt_orderly_shutdown_on_fatal_signal = true;
DEFVAR_LISP ("while-no-input-ignore-events",
Vwhile_no_input_ignore_events,
doc: /* Ignored events from while-no-input. */);
DEFVAR_BOOL ("inhibit--record-char",
inhibit_record_char,
doc: /* If non-nil, don't record input events.
This inhibits recording input events for the purposes of keyboard
macros, dribble file, and `recent-keys'.
Internal use only. */);
pdumper_do_now_and_after_load (syms_of_keyboard_for_pdumper);
}
......@@ -11878,17 +11889,8 @@ syms_of_keyboard_for_pdumper (void)
eassert (initial_kboard == NULL);
initial_kboard = allocate_kboard (Qt);
DEFVAR_LISP ("while-no-input-ignore-events",
Vwhile_no_input_ignore_events,
doc: /* Ignored events from while-no-input. */);
Vwhile_no_input_ignore_events = Qnil;
DEFVAR_BOOL ("inhibit--record-char",
inhibit_record_char,
doc: /* If non-nil, don't record input events.
This inhibits recording input events for the purposes of keyboard
macros, dribble file, and `recent-keys'.
Internal use only. */);
inhibit_record_char = false;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment