summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2019-03-02 11:05:40 -0800
committerPaul Eggert <eggert@cs.ucla.edu>2019-03-02 11:06:40 -0800
commit5f99d515c921ee5546483ddab15e08f9b23280d9 (patch)
tree7e00ad4f2be6ec0c6b0cc602c54aa9199d67740a /src
parent954c9c5bc344cdd6b201c2260b306ec0999aff24 (diff)
downloademacs-5f99d515c921ee5546483ddab15e08f9b23280d9.tar.gz
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.
Diffstat (limited to 'src')
-rw-r--r--src/alloc.c2
-rw-r--r--src/keyboard.c20
2 files changed, 13 insertions, 9 deletions
diff --git a/src/alloc.c b/src/alloc.c
index 7d63e3c79b6..452d31f9398 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -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;
diff --git a/src/keyboard.c b/src/keyboard.c
index 6e805ec7e69..38074458373 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -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;
}