diff options
| author | Stefan Monnier | 2021-01-20 09:52:07 -0500 |
|---|---|---|
| committer | Stefan Monnier | 2021-01-20 10:36:46 -0500 |
| commit | 82c228a017cfbb69ac5a91fba51419eb3b1f7032 (patch) | |
| tree | 69978f504bd871f5ee50b1cba708e0d0a8e784a7 /src | |
| parent | b58fd1eab9e7a07711b63f5ce67d518972efaba9 (diff) | |
| download | emacs-82c228a017cfbb69ac5a91fba51419eb3b1f7032.tar.gz emacs-82c228a017cfbb69ac5a91fba51419eb3b1f7032.zip | |
Don't let `maybe_quit` prevent resetting `consing_until_gc` (bug#43389)
* src/alloc.c (garbage_collect): Postpone `unblock_input` a bit.
* src/window.c (window_parameter): Avoid `maybe_quit`.
cherry picked from commit 420661af07448857f0a17e15dc27bceeb6aff541
Diffstat (limited to 'src')
| -rw-r--r-- | src/alloc.c | 6 | ||||
| -rw-r--r-- | src/window.c | 2 |
2 files changed, 5 insertions, 3 deletions
diff --git a/src/alloc.c b/src/alloc.c index ebd99b9f65b..4c76f4a554e 100644 --- a/src/alloc.c +++ b/src/alloc.c | |||
| @@ -5987,11 +5987,13 @@ garbage_collect (void) | |||
| 5987 | 5987 | ||
| 5988 | gc_in_progress = 0; | 5988 | gc_in_progress = 0; |
| 5989 | 5989 | ||
| 5990 | unblock_input (); | ||
| 5991 | |||
| 5992 | consing_until_gc = gc_threshold | 5990 | consing_until_gc = gc_threshold |
| 5993 | = consing_threshold (gc_cons_threshold, Vgc_cons_percentage, 0); | 5991 | = consing_threshold (gc_cons_threshold, Vgc_cons_percentage, 0); |
| 5994 | 5992 | ||
| 5993 | /* Unblock *after* re-setting `consing_until_gc` in case `unblock_input` | ||
| 5994 | signals an error (see bug#43389). */ | ||
| 5995 | unblock_input (); | ||
| 5996 | |||
| 5995 | if (garbage_collection_messages && NILP (Vmemory_full)) | 5997 | if (garbage_collection_messages && NILP (Vmemory_full)) |
| 5996 | { | 5998 | { |
| 5997 | if (message_p || minibuf_level > 0) | 5999 | if (message_p || minibuf_level > 0) |
diff --git a/src/window.c b/src/window.c index 43f2a8f00f2..f231187f7b3 100644 --- a/src/window.c +++ b/src/window.c | |||
| @@ -2272,7 +2272,7 @@ return value is a list of elements of the form (PARAMETER . VALUE). */) | |||
| 2272 | Lisp_Object | 2272 | Lisp_Object |
| 2273 | window_parameter (struct window *w, Lisp_Object parameter) | 2273 | window_parameter (struct window *w, Lisp_Object parameter) |
| 2274 | { | 2274 | { |
| 2275 | Lisp_Object result = Fassq (parameter, w->window_parameters); | 2275 | Lisp_Object result = assq_no_quit (parameter, w->window_parameters); |
| 2276 | 2276 | ||
| 2277 | return CDR_SAFE (result); | 2277 | return CDR_SAFE (result); |
| 2278 | } | 2278 | } |