#include "dispextern.h"
#include "keyboard.h"
#include "intervals.h"
+#include "blockinput.h"
#include <setjmp.h>
#include <errno.h>
extern int errno;
+/* Variables for blockinput.h: */
+
+/* Non-zero if interrupt input is blocked right now. */
+int interrupt_input_blocked;
+
+/* Nonzero means an input interrupt has arrived
+ during the current critical section. */
+int interrupt_input_pending;
+
+
#ifdef HAVE_X_WINDOWS
extern Lisp_Object Vmouse_grabbed;
SIGTYPE
input_poll_signal ()
{
-#ifdef HAVE_X_WINDOWS
- extern int x_input_blocked;
- if (x_input_blocked == 0)
-#endif
- if (!waiting_for_input)
- read_avail_input (0);
+ if (interrupt_input_blocked == 0
+ && !waiting_for_input)
+ read_avail_input (0);
signal (SIGALRM, input_poll_signal);
alarm (polling_period);
}
XSET (internal_last_event_frame, Lisp_Frame, selected_frame);
Vlast_event_frame = internal_last_event_frame;
#endif
+ /* If we report the quit char as an event,
+ don't do so more than once. */
+ if (!NILP (Vinhibit_quit))
+ Vquit_flag = Qnil;
goto non_reread;
}
Qnil);
Lisp_Object mask;
+ if (modifiers & ~((1<<VALBITS) - 1))
+ abort ();
XFASTINT (mask) = modifiers;
elements = Fcons (unmodified, Fcons (mask, Qnil));
/* The click modifier never figures into cache indices. */
cache = Fget (base, Qmodifier_cache);
+ if (modifiers & ~((1<<VALBITS) - 1))
+ abort ();
XFASTINT (index) = (modifiers & ~click_modifier);
entry = Fassq (index, cache);
Fput (base, Qmodifier_cache, Fcons (entry, cache));
/* We have the parsing info now for free, so add it to the caches. */
+ if (modifiers & ~((1<<VALBITS) - 1))
+ abort ();
XFASTINT (index) = modifiers;
Fput (new_symbol, Qevent_symbol_element_mask,
Fcons (base, Fcons (index, Qnil)));