diff --git a/src/callint.c b/src/callint.c index 6f8a7f13f6..381a3443d2 100644 --- a/src/callint.c +++ b/src/callint.c @@ -606,7 +606,7 @@ DEFUN ("call-interactively", Fcall_interactively, Scall_interactively, 1, 3, 0, break; case 'e': /* The invoking event. */ - if (next_event >= key_count) + if (!inhibit_event_check && next_event >= key_count) error ("%s must be bound to an event with parameters", (SYMBOLP (function) ? SSDATA (SYMBOL_NAME (function)) @@ -900,6 +900,13 @@ syms_of_callint (void) a way to turn themselves off when a mouse command switches windows. */); Vmouse_leave_buffer_hook = Qnil; + DEFVAR_BOOL ("inhibit-event-check", inhibit_event_check, + doc: /* Non-nil means the interactive spec "e" doesn't check for events. +In this case `(interactive "e")' doesn't signal an error when no event +is produced. Then `event-start', `event-end', `event-click-count' +can create a new event. */); + inhibit_event_check = false; + defsubr (&Sinteractive); defsubr (&Scall_interactively); defsubr (&Sfuncall_interactively);