[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Signal `quit' in a `font-lock-fontify-region-function'
From: |
Stefan Monnier |
Subject: |
Re: Signal `quit' in a `font-lock-fontify-region-function' |
Date: |
Thu, 16 May 2019 19:20:39 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
> Error during redisplay: (jit-lock-function ##) signaled (quit)
This is indeed the behavior I expect (tho I don't really like it, but
I never dared to change jit-lock to set inhibit-quit).
> sometimes it doesn't.
Is there a difference in behavior in this respect when you try it in the
GUI vs in a tty? How 'bout in another OS?
Does it happen more often if you wait a while until you starting banging
on C-g? E.g. it might be that the event buffer is full (see patch below)?
Stefan
diff --git a/src/keyboard.c b/src/keyboard.c
index 5f2b7afe6d..405790312d 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -3568,12 +3568,15 @@ kbd_buffer_store_buffered_event (union
buffered_input_event *event,
{
/* Don't read keyboard input until we have processed kbd_buffer.
This happens when pasting text longer than KBD_BUFFER_SIZE/2. */
+ fprintf (stderr, "Too many pending events, putting keyboard on
hold!\n");
hold_keyboard_input ();
unrequest_sigio ();
stop_polling ();
}
#endif /* subprocesses */
}
+ else
+ fprintf (stderr, "event buffer full: dropping event!\n");
Lisp_Object ignore_event;