diff options
| author | Paul Eggert | 2019-03-02 11:05:40 -0800 |
|---|---|---|
| committer | Paul Eggert | 2019-03-02 11:06:40 -0800 |
| commit | 5f99d515c921ee5546483ddab15e08f9b23280d9 (patch) | |
| tree | 7e00ad4f2be6ec0c6b0cc602c54aa9199d67740a /src | |
| parent | 954c9c5bc344cdd6b201c2260b306ec0999aff24 (diff) | |
| download | emacs-5f99d515c921ee5546483ddab15e08f9b23280d9.tar.gz emacs-5f99d515c921ee5546483ddab15e08f9b23280d9.zip | |
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.c | 2 | ||||
| -rw-r--r-- | src/keyboard.c | 20 |
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) | |||
| 5725 | void | 5725 | void |
| 5726 | staticpro (Lisp_Object *varaddress) | 5726 | staticpro (Lisp_Object *varaddress) |
| 5727 | { | 5727 | { |
| 5728 | for (int i = 0; i < staticidx; i++) | ||
| 5729 | eassert (staticvec[i] != varaddress); | ||
| 5728 | if (staticidx >= NSTATICS) | 5730 | if (staticidx >= NSTATICS) |
| 5729 | fatal ("NSTATICS too small; try increasing and recompiling Emacs."); | 5731 | fatal ("NSTATICS too small; try increasing and recompiling Emacs."); |
| 5730 | staticvec[staticidx++] = varaddress; | 5732 | 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. | |||
| 11844 | If nil, Emacs crashes immediately in response to fatal signals. */); | 11844 | If nil, Emacs crashes immediately in response to fatal signals. */); |
| 11845 | attempt_orderly_shutdown_on_fatal_signal = true; | 11845 | attempt_orderly_shutdown_on_fatal_signal = true; |
| 11846 | 11846 | ||
| 11847 | DEFVAR_LISP ("while-no-input-ignore-events", | ||
| 11848 | Vwhile_no_input_ignore_events, | ||
| 11849 | doc: /* Ignored events from while-no-input. */); | ||
| 11850 | |||
| 11851 | DEFVAR_BOOL ("inhibit--record-char", | ||
| 11852 | inhibit_record_char, | ||
| 11853 | doc: /* If non-nil, don't record input events. | ||
| 11854 | This inhibits recording input events for the purposes of keyboard | ||
| 11855 | macros, dribble file, and `recent-keys'. | ||
| 11856 | Internal use only. */); | ||
| 11857 | |||
| 11847 | pdumper_do_now_and_after_load (syms_of_keyboard_for_pdumper); | 11858 | pdumper_do_now_and_after_load (syms_of_keyboard_for_pdumper); |
| 11848 | } | 11859 | } |
| 11849 | 11860 | ||
| @@ -11878,17 +11889,8 @@ syms_of_keyboard_for_pdumper (void) | |||
| 11878 | eassert (initial_kboard == NULL); | 11889 | eassert (initial_kboard == NULL); |
| 11879 | initial_kboard = allocate_kboard (Qt); | 11890 | initial_kboard = allocate_kboard (Qt); |
| 11880 | 11891 | ||
| 11881 | DEFVAR_LISP ("while-no-input-ignore-events", | ||
| 11882 | Vwhile_no_input_ignore_events, | ||
| 11883 | doc: /* Ignored events from while-no-input. */); | ||
| 11884 | Vwhile_no_input_ignore_events = Qnil; | 11892 | Vwhile_no_input_ignore_events = Qnil; |
| 11885 | 11893 | ||
| 11886 | DEFVAR_BOOL ("inhibit--record-char", | ||
| 11887 | inhibit_record_char, | ||
| 11888 | doc: /* If non-nil, don't record input events. | ||
| 11889 | This inhibits recording input events for the purposes of keyboard | ||
| 11890 | macros, dribble file, and `recent-keys'. | ||
| 11891 | Internal use only. */); | ||
| 11892 | inhibit_record_char = false; | 11894 | inhibit_record_char = false; |
| 11893 | } | 11895 | } |
| 11894 | 11896 | ||