diff options
Diffstat (limited to 'src/callint.c')
-rw-r--r-- | src/callint.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/callint.c b/src/callint.c index 6f8a7f13f61..44dae361c1f 100644 --- a/src/callint.c +++ b/src/callint.c @@ -606,7 +606,7 @@ invoke it (via an `interactive' spec that contains, for instance, an break; case 'e': /* The invoking event. */ - if (next_event >= key_count) + if (!inhibit_mouse_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,14 @@ Its purpose is to give temporary modes such as Isearch mode a way to turn themselves off when a mouse command switches windows. */); Vmouse_leave_buffer_hook = Qnil; + DEFVAR_BOOL ("inhibit-mouse-event-check", inhibit_mouse_event_check, + doc: /* Whether the interactive spec "e" requires a mouse gesture event. +If non-nil, `(interactive "e")' doesn't signal an error when the command +was invoked by an input event that is not a mouse gesture: a click, a drag, +etc. To create the event data when the input was some other event, +use `event-start', `event-end', and `event-click-count'. */); + inhibit_mouse_event_check = false; + defsubr (&Sinteractive); defsubr (&Scall_interactively); defsubr (&Sfuncall_interactively); |